mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
gameexec.c: in VM_Fall(), comment out dead code, small indentation change.
git-svn-id: https://svn.eduke32.com/eduke32@3684 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0db0587731
commit
bac1a3ff63
1 changed files with 53 additions and 50 deletions
|
@ -858,15 +858,14 @@ static int32_t VM_AddWeapon(int32_t weap, int32_t amount, DukePlayer_t *ps)
|
|||
|
||||
static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
||||
{
|
||||
int32_t grav = g_spriteGravity;
|
||||
|
||||
g_sp->xoffset = g_sp->yoffset = 0;
|
||||
|
||||
{
|
||||
int32_t j = g_spriteGravity;
|
||||
|
||||
if (G_CheckForSpaceCeiling(g_sp->sectnum) || sector[g_sp->sectnum].lotag == ST_2_UNDERWATER)
|
||||
j = g_spriteGravity/6;
|
||||
grav = g_spriteGravity/6;
|
||||
else if (G_CheckForSpaceFloor(g_sp->sectnum))
|
||||
j = 0;
|
||||
grav = 0;
|
||||
|
||||
if (!actor[g_i].cgg-- || (sector[g_sp->sectnum].floorstat&2))
|
||||
{
|
||||
|
@ -876,7 +875,8 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
|||
|
||||
if (g_sp->z < actor[g_i].floorz-ZOFFSET)
|
||||
{
|
||||
g_sp->zvel = min(g_sp->zvel+j, ACTOR_MAXFALLINGZVEL);
|
||||
// Free fall.
|
||||
g_sp->zvel = min(g_sp->zvel+grav, ACTOR_MAXFALLINGZVEL);
|
||||
g_sp->z += g_sp->zvel;
|
||||
#ifdef YAX_ENABLE
|
||||
if (yax_getbunch(g_sp->sectnum, YAX_FLOOR) >= 0 &&
|
||||
|
@ -889,6 +889,7 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
|||
return;
|
||||
}
|
||||
|
||||
// SET_SPRITE_Z
|
||||
g_sp->z = actor[g_i].floorz - ZOFFSET;
|
||||
|
||||
if (A_CheckEnemySprite(g_sp) || (g_sp->picnum == APLAYER && g_sp->owner >= 0))
|
||||
|
@ -919,16 +920,19 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
|||
A_PlaySound(THUD, g_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_sp->z > (actor[g_i].floorz - ZOFFSET))
|
||||
#if 0
|
||||
if (g_sp->z > actor[g_i].floorz - ZOFFSET)
|
||||
{
|
||||
// Unreachable because of SET_SPRITE_Z.
|
||||
A_GetZLimits(g_i);
|
||||
if (actor[g_i].floorz != sector[g_sp->sectnum].floorz)
|
||||
g_sp->z = (actor[g_i].floorz - ZOFFSET);
|
||||
return;
|
||||
}
|
||||
else if (sector[g_sp->sectnum].lotag == ST_1_ABOVE_WATER)
|
||||
#endif
|
||||
|
||||
if (sector[g_sp->sectnum].lotag == ST_1_ABOVE_WATER)
|
||||
{
|
||||
switch (DYNAMICTILEMAP(g_sp->picnum))
|
||||
{
|
||||
|
@ -942,7 +946,6 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
|||
#if !defined LUNATIC
|
||||
int32_t moveScriptOfs = vm.g_t[1];
|
||||
#endif
|
||||
|
||||
// fix for flying/jumping monsters getting stuck in water
|
||||
if ((g_sp->hitag & jumptoplayer) ||
|
||||
(G_HaveActor(g_sp->picnum) &&
|
||||
|
|
Loading…
Reference in a new issue