Fix rare crash where HudTick can somehow be called without an Owner.

This commit is contained in:
Mari the Deer 2020-12-12 00:15:07 +01:00
commit 1cf1e78df5
5 changed files with 6 additions and 1 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r674 \cu(Fri 11 Dec 22:51:47 CET 2020)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r674 \cu(Sat 12 Dec 00:15:07 CET 2020)";

View file

@ -11,3 +11,4 @@ lore/mklang*
models/*.blend
models/*.blend1
models/*.xcf
tools

View file

@ -931,6 +931,7 @@ Class Wallbuster : SWWMWeapon
override void HudTick()
{
Super.HudTick();
if ( !Owner ) return;
// 25-trace
for ( int i=0; i<25; i++ )
[cpos25[i], ccol25[i]] = TraceForCrosshair25(i);

View file

@ -1092,6 +1092,7 @@ Class SWWMWeapon : Weapon abstract
// HUD-side ticking
virtual ui void HudTick()
{
if ( !Owner ) return;
[cpos, ccol] = TraceForCrosshair();
// avoid jumpy switching
if ( Owner.player.PendingWeapon is 'SWWMWeapon' )

View file

@ -316,6 +316,7 @@ Class ExplodiumGun : SWWMWeapon
override void HudTick()
{
if ( !Owner ) return;
[cpos, ccol] = TraceForCrosshair();
let sw = SWWMWeapon(SisterWeapon);
// avoid jumpy switching
@ -740,6 +741,7 @@ Class DualExplodiumGun : SWWMWeapon
override void HudTick()
{
if ( !Owner ) return;
[cpos, ccol] = TraceForCrosshair();
let sw = SWWMWeapon(SisterWeapon);
// avoid jumpy switching