This conditional check changes the value of the movetype to MOVETYPE_FLY and then immediately after that to MOVETYPE_BOUNCE.
The intended behavior of this code is to restore the Snark's movetype to bounce when it leaves water, but only if its previous movetype was fly.
Although the Snark's behavior is still correct barring changes to the movetype from outside the Snark's code, this check should be fixed so modders can safely change the movetype without having to deal with this overriding behavior.
The fix:
else if (pev->movetype == MOVETYPE_FLY)
{
pev->movetype = MOVETYPE_BOUNCE;
}
The snark has an incorrect if statement here: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/squeakgrenade.cpp#L223-L236
This conditional check changes the value of the movetype to
MOVETYPE_FLY
and then immediately after that toMOVETYPE_BOUNCE
.The intended behavior of this code is to restore the Snark's movetype to bounce when it leaves water, but only if its previous movetype was fly.
Although the Snark's behavior is still correct barring changes to the movetype from outside the Snark's code, this check should be fixed so modders can safely change the movetype without having to deal with this overriding behavior.
The fix: