ViewpointSwitch hack so nobody does anything evil

Prints the generic "can't do this in a HUD hook" message. Whatever. I'm tired.
This commit is contained in:
Jaime Passos 2019-12-18 23:47:17 -03:00
parent be5fd1a0db
commit 6f857df5e5
1 changed files with 3 additions and 0 deletions

View File

@ -1406,6 +1406,7 @@ UINT8 LUAh_ViewpointSwitch(player_t *player, player_t *newdisplayplayer)
return 0;
lua_settop(gL, 0);
hud_running = true;
for (hookp = playerhooks; hookp; hookp = hookp->next)
{
@ -1439,6 +1440,8 @@ UINT8 LUAh_ViewpointSwitch(player_t *player, player_t *newdisplayplayer)
}
lua_settop(gL, 0);
hud_running = false;
return canSwitchView;
}