From e16fde611f87af9f9cdd0a8c7413e12f226ff675 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 5 Apr 2009 03:22:36 +0000 Subject: [PATCH] - Fixed: GetPlayerInput() died if you tried to get the input of the activator and the activator was the world. SVN r1522 (trunk) --- docs/rh-log.txt | 6 +++++- src/p_acs.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 55ee808a6..20053ca44 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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 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 diff --git a/src/p_acs.cpp b/src/p_acs.cpp index d616be1b1..34845098a 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2648,6 +2648,10 @@ int DLevelScript::GetPlayerInput(int playernum, int inputnum) if (playernum < 0) { + if (activator == NULL) + { + return 0; + } p = activator->player; } else if (playernum >= MAXPLAYERS || !playeringame[playernum])