Fix medikit message showing when medikit not picked up

This commit is contained in:
Lephenixnoir 2021-08-31 19:50:12 +02:00
parent 1f290006f1
commit cc1094394e
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 5 additions and 3 deletions

View File

@ -292,6 +292,7 @@ void P_TouchSpecialThing ( mobj_t* special, mobj_t* toucher )
player_t* player;
int i;
fixed_t delta;
int medikit_variant;
//int sound;
delta = special->z - toucher->z;
@ -422,12 +423,13 @@ void P_TouchSpecialThing ( mobj_t* special, mobj_t* toucher )
break;
case SPR_MEDI:
if (player->health < 25)
medikit_variant = (player->health < 25);
if (!P_GiveBody (player, 25))
return;
if (medikit_variant)
player->message = GOTMEDINEED;
else
player->message = GOTMEDIKIT;
if (!P_GiveBody (player, 25))
return;
break;