mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-10 06:42:21 +00:00
Reset gibsthisframe and lastgibframe at map change
Without this change the conditionals at g_misc.c:199 and 381 wouldn't trigger until level.framenum reach it's previous value, resulting in much to few debris or gibs being thrown. This fixes #104. Many thanks to maraakate for the analysis and the idea how to fix it.
This commit is contained in:
parent
89586edf99
commit
89cb707444
3 changed files with 12 additions and 6 deletions
|
@ -399,6 +399,9 @@ ExitLevel(void)
|
|||
ent->health = ent->client->pers.max_health;
|
||||
}
|
||||
}
|
||||
|
||||
gibsthisframe = 0;
|
||||
lastgibframe = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "header/local.h"
|
||||
|
||||
int gibsthisframe = 0;
|
||||
int lastgibframe = 0;
|
||||
int gibsthisframe;
|
||||
int lastgibframe;
|
||||
|
||||
extern void M_WorldEffects(edict_t *ent);
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ typedef struct
|
|||
qboolean autosaved;
|
||||
} game_locals_t;
|
||||
|
||||
/* this structure is cleared as each map is entered
|
||||
/* this structure is cleared as each map is entered
|
||||
it is read/written to the level.sav file for savegames */
|
||||
typedef struct
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ typedef struct
|
|||
int monster_slots;
|
||||
int monster_used;
|
||||
edict_t *commander;
|
||||
|
||||
|
||||
/* powerup timers, used by widow, our friend */
|
||||
float quad_framenum;
|
||||
float invincible_framenum;
|
||||
|
@ -501,6 +501,9 @@ extern int jacket_armor_index;
|
|||
extern int combat_armor_index;
|
||||
extern int body_armor_index;
|
||||
|
||||
extern int gibsthisframe;
|
||||
extern int lastgibframe;
|
||||
|
||||
/* means of death */
|
||||
#define MOD_UNKNOWN 0
|
||||
#define MOD_BLASTER 1
|
||||
|
@ -1037,7 +1040,7 @@ typedef struct
|
|||
qboolean spectator; /* client is a spectator */
|
||||
} client_respawn_t;
|
||||
|
||||
/* this structure is cleared on each
|
||||
/* this structure is cleared on each
|
||||
PutClientInServer(), except for 'client->pers' */
|
||||
struct gclient_s
|
||||
{
|
||||
|
@ -1134,7 +1137,7 @@ struct edict_s
|
|||
{
|
||||
entity_state_t s;
|
||||
struct gclient_s *client; /* NULL if not a player the server expects the first part
|
||||
of gclient_s to be a player_state_t but the rest of it is
|
||||
of gclient_s to be a player_state_t but the rest of it is
|
||||
opaque */
|
||||
|
||||
qboolean inuse;
|
||||
|
|
Loading…
Reference in a new issue