Five Elite Mercenaries are send to an Island in middle of the 1980'. The Task: Find and Eliminate a local Drug Baron. Features: new Physic, real Sunmovement, Day/Night Change, Hunger/Food system, realistic (!) Weather system, Light/Dark viewing system for AI, 5 different Fractions on the Island. Complete Realistic simulation of nearly all things, including Sleep. New weapons, new Vehicles. Vehicles driving system is now exact (!) like GTA IV , FireSystem,... this mod is Heavily inspired by GTA, IGI, FarCry.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
FarCry0728
embed
share
view previous next
Share Image
Share on Facebook Post Email a friend
Embed Image
Post comment Comments
pvcf Author
pvcf - - 4,943 comments

but it's never to late to mix it up with a thrown blendgrenade inside the vehicle too :D
looks like something from dantes hell inferno and shows accidentally what cryengine is capable to do :D
all is in motion and wabering around :D

ok, have to forbid throwing grenades inside vehicles -.-
will be not so easy, because this part is done by a not delivered code in c++, this is not part of the SDK (as i found out last week by trying to allowing throwing grenades (glowstick is a grenade class) under water. *

there is a secret routine prebacked in a dll which deny that.
so i have now to recode some things so its not allowed to throw grenades inside a vehicle -.-

*
by testplaying a secret cave which have a diving part, i could not see anything below water, it was just dark :) (like it should be !!).
because the flashlight doesnt helped much i tried just to throw some glowsticks which mostly help in all circumstances, but grenade spawing is forbidden under water -.- )

Reply Good karma+2 votes
Szczekus
Szczekus - - 380 comments

What about
BasicPlayer:Server_OnFireGrenade and
BasicPlayer:Client_OnFireGrenade ?

Remove the Params.underwater check to be able to throw anything you want[ even in visareas below sea level ]. Additionally use stats:IsSwimming() to throw your glow stick thingy in water.

The vehicle part should be as easy as this, just don`t repeat my mistake and don`t check stats.theVehicle instead of self.theVehicle .

"this part is done by a not delivered code in c++, this is not part of the SDK"
<whispers> void CPlayer::FireGrenade @~2301 XPlayer.cpp :*
There is the water check that gets passed to both lua functions mentioned above. You could check for the vehicle too, but I know you prefer lua.

I <3 u 2 :3

Reply Good karma Bad karma+2 votes
pvcf Author
pvcf - - 4,943 comments

nice to see you here again :)

the lua part in basichandgrenade with waterhigh aksing you describe is for explosion only, not for spawing / throwing.
the server and client inits are simply not called if player is in or below water(surface). it's denied in the c++ part.

> <whispers> void CPlayer::FireGrenade @~2301 XPlayer.cpp :*

already checked, i have changed the water part and literally NOTHING happened or changed :D
(haha, just to be sure you talk about the same i tested last week, i opened the solution and the blinking cursor was still at last position right behind if (fWaterLevel>origin.z)
pTable->SetValue("underwater",0);

if its there a clear if below water dont process further condition... removing this do really nothing, it's still not possible to throw grenades. i have to create a own routine for the glowsticks.
what did you mean with stats.isswimming ?

> stats.theVehicle instead of self.theVehicle

i have a code which can print a complete table to console, so i have readen out the first contact table from the grenade (its a particle) and its NOT the vehicle, its terrain.
my mistake was, that i have thrown the grenade in vehicle, out of the vehicle but because of the third person cam the throwing angle was so high, that the grenade touches the terrain below players feet and exploded there.
so we have no problem throwing grenades out a vehicle as long you care about the crosshair position in third person view.

that means there is *somewhere* a code which already asks for non colliding with spawner, and in that case its _localplayer.theVehicle, which is the vehicle.
same for bullets, but this part is done in basciweapon in lua. the grenade part not.

Reply Good karma+2 votes
Szczekus
Szczekus - - 380 comments

I`ve got it all working right in from of my eyes.

1. BasicPlayer.lua not BaseHandGrenade.lua
2. remove the stats.underwater check
3. instead add self.theVehicle

= No grenades inside vehicles.
= Throw grenades underwater

Reply Good karma Bad karma+2 votes
pvcf Author
pvcf - - 4,943 comments

> 1. BasicPlayer.lua not BaseHandGrenade.lua

omg, never was thinking about searching there -.- thanx, will give it a try tomorrow :D
but basically the vehicle no grenade part should maybe also doable with actionkeyset but i always hate editing this on the fly. i actually do this with my "game pause mode", i basically unmap all actionekeysets and have to ask first if player is in vehicle or not to get the right akeyset, delete it then and restore it later, dirty stuff which i dont really like.

so many thanx for your investigation and providing a much smoother and better solution :)
thumbs up!

Reply Good karma+2 votes
pvcf Author
pvcf - - 4,943 comments

ah piece of cake
if stats.reloading or (stats == _localplayer.cnt and _localplayer.theVehicle) then return end

thank you !!

Reply Good karma+2 votes
Raygoza
Raygoza - - 1,639 comments

Will your change allow grenades from the outside enter the car?

Reply Good karma Bad karma+1 vote
pvcf Author
pvcf - - 4,943 comments

you mean if i forbid to throw grenades into a car ? no.
i plan only forbid throwing grenades if player is inside a vehicle.
unfortunately i don't know to 100% if player have a "open" vehicle like jetski or motorbike.
but maybe i can dive into the collusiondetection of flying grenade and simply forbid to react with players vehicle.
that would allow to throw grenades from all vehicles.
i have actually no idea what i have done wrong because as far as i remember in original farcry the actionmap vehicle, (this is the keyset for player in vehicle), does not have mapped grenades throwing, but i have it in devkid. dont know where and when i have inserted this "feature" -.-

Reply Good karma+2 votes
Raygoza
Raygoza - - 1,639 comments

Check if the unmodified devset has that problem.
And if you caused it it's probably as a side effect of something else you did.

Reply Good karma Bad karma+2 votes
pvcf Author
pvcf - - 4,943 comments

i think the problem was, i throwed the grenade in third person view, were the cam is hovering over the vehicle and you look to ground. then throwing a grenade cause a instant explosion because you throw it to players feet, (inside the vehicle).
have tested it again and printed the table of first contact from grenade into memory so i could exactly read out what happened, and no vehicle contact. seems playervehicle is ignored like if you shoot from a boat.

Reply Good karma+2 votes
Elouise
Elouise - - 175 comments

Any reason to shift position of Godmode, usually we expect to find it in top left hand corner.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: