From 469c53e03e6243a3b95f49a4da69cc5b8488cd41 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sat, 20 Feb 2016 17:46:14 +0100 Subject: [PATCH] Reset gibsthisframe and lastgibframe at map change ported de5849caf534c5c687bcfcd9f5951e3a62da3fd7 from yquake2 to zaero --- src/g_main.c | 2 ++ src/header/local.h | 3 +++ src/shared/shared.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/g_main.c b/src/g_main.c index b0ea867..c4958c0 100644 --- a/src/g_main.c +++ b/src/g_main.c @@ -280,6 +280,8 @@ void ExitLevel (void) level.fadeFrames = 0; level.exitintermission = 0; level.intermissiontime = 0; + gibsthisframe = 0; + lastgibframe = 0; } /* diff --git a/src/header/local.h b/src/header/local.h index 7063665..f59cbfb 100644 --- a/src/header/local.h +++ b/src/header/local.h @@ -503,6 +503,9 @@ extern spawn_temp_t st; extern int sm_meat_index; extern int snd_fry; +extern int gibsthisframe; +extern int lastgibframe; + extern int jacket_armor_index; extern int combat_armor_index; extern int body_armor_index; diff --git a/src/shared/shared.c b/src/shared/shared.c index 0384872..bc5ae5c 100644 --- a/src/shared/shared.c +++ b/src/shared/shared.c @@ -1219,7 +1219,7 @@ Info_RemoveKey(char *s, char *key) if (!strcmp(key, pkey)) { - strcpy(start, s); /* remove this part */ + memmove(start, s, strlen(s) + 1); /* remove this part */ return; }