- Fixed: SecretTriggers that were activated in an OPEN script caused a crash.
SVN r389 (trunk)
This commit is contained in:
parent
49422188f2
commit
beca482a68
4 changed files with 37 additions and 35 deletions
|
|
@ -62,19 +62,22 @@ void ASecretTrigger::PostBeginPlay ()
|
|||
|
||||
void ASecretTrigger::Activate (AActor *activator)
|
||||
{
|
||||
if (activator->CheckLocalView (consoleplayer))
|
||||
if (activator != NULL)
|
||||
{
|
||||
if (args[0] <= 1)
|
||||
if (activator->CheckLocalView (consoleplayer))
|
||||
{
|
||||
C_MidPrint (secretmessage);
|
||||
}
|
||||
if (args[0] == 0 || args[0] == 2)
|
||||
{
|
||||
S_Sound (activator, CHAN_AUTO, "misc/secret", 1, ATTN_NORM);
|
||||
if (args[0] <= 1)
|
||||
{
|
||||
C_MidPrint (secretmessage);
|
||||
}
|
||||
if (args[0] == 0 || args[0] == 2)
|
||||
{
|
||||
S_Sound (activator, CHAN_AUTO, "misc/secret", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
level.found_secrets++;
|
||||
if (activator->player) activator->player->secretcount++;
|
||||
Destroy ();
|
||||
}
|
||||
level.found_secrets++;
|
||||
if (activator->player) activator->player->secretcount++;
|
||||
Destroy ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ extern void ApplyActorDefault (int defnum, int dataint);
|
|||
FActorInfo actor##ActorInfo = {
|
||||
|
||||
#define BEGIN_DEFAULTS_POST(actor,game,ednum,id) \
|
||||
GAME_##game, id, ednum, actor##DefaultsConstructor }; \
|
||||
GAME_##game, id, ednum, NULL, actor##DefaultsConstructor }; \
|
||||
void actor##DefaultsConstructor() { \
|
||||
|
||||
#define END_DEFAULTS }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue