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:
Yamagi Burmeister 2015-10-24 13:14:31 +02:00
parent 0516300a11
commit 8a40cd5e9f
3 changed files with 29 additions and 22 deletions

View file

@ -384,6 +384,9 @@ ExitLevel(void)
ent->health = ent->client->pers.max_health;
}
}
gibsthisframe = 0;
lastgibframe = 0;
}
/*

View file

@ -1,7 +1,7 @@
#include "header/local.h"
int gibsthisframe = 0;
int lastgibframe = 0;
int gibsthisframe;
int lastgibframe;
/*
* QUAKED func_group (0 0 0) ?

View file

@ -446,6 +446,10 @@ extern spawn_temp_t st;
extern int sm_meat_index;
extern int snd_fry;
extern int gibsthisframe;
extern int lastgibframe;
/* means of death */
#define MOD_UNKNOWN 0
#define MOD_BLASTER 1