Fix abort where OnGiveSecret is called before PostBeginPlay (because some mappers are just that wonderful).

This commit is contained in:
Mari the Deer 2020-12-17 09:39:47 +01:00
commit 4416ba30e5
2 changed files with 3 additions and 1 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r685 \cu(Wed 16 Dec 21:38:56 CET 2020)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r686 \cu(Thu 17 Dec 09:39:47 CET 2020)";

View file

@ -1812,6 +1812,8 @@ Class Demolitionist : PlayerPawn
if ( CheckLocalView() ) SWWMHandler.AddOneliner("findsecret",2,40);
SWWMCredits.Give(player,score);
SWWMScoreObj.Spawn(score,Vec3Offset(0,0,Height/2));
// somehow ongivesecret can be called BEFORE PostBeginPlay (what the fuck)
if ( !mystats ) mystats = SWWMStats.Find(player);
mystats.secrets++;
return true;
}