- Fixed: GetPlayerInput() died if you tried to get the input of the activator

and the activator was the world.


SVN r1522 (trunk)
This commit is contained in:
Randy Heit 2009-04-05 03:22:36 +00:00
parent 78fb48302c
commit e16fde611f
2 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,8 @@
April 4, 2009 (Changes by Graf Zahl) April 4, 2009
- Fixed: GetPlayerInput() died if you tried to get the input of the activator
and the activator was the world.
April 4, 2009 (Changes by Graf Zahl)
- fixed: Any player class inheriting directly from PlayerPawn was left with - fixed: Any player class inheriting directly from PlayerPawn was left with
empty weapon slots due to the recent rewrite of the weapon slot assignment empty weapon slots due to the recent rewrite of the weapon slot assignment
code. To handle such classes each game now defines a default weapon slot code. To handle such classes each game now defines a default weapon slot

View file

@ -2648,6 +2648,10 @@ int DLevelScript::GetPlayerInput(int playernum, int inputnum)
if (playernum < 0) if (playernum < 0)
{ {
if (activator == NULL)
{
return 0;
}
p = activator->player; p = activator->player;
} }
else if (playernum >= MAXPLAYERS || !playeringame[playernum]) else if (playernum >= MAXPLAYERS || !playeringame[playernum])