aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-17 21:53:06 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-17 21:53:06 +0000
commit7cac56cb9bcaabed9562a7b46718f5c5de3400b8 (patch)
tree5602ee1282509d028d8e4a76bd035cc2996b9f33 /Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut
parent06924c215dcf8d4dd425cbbf178509bc222c2f7d (diff)
downloadNorthstarMods-7cac56cb9bcaabed9562a7b46718f5c5de3400b8.tar.gz
NorthstarMods-7cac56cb9bcaabed9562a7b46718f5c5de3400b8.zip
wargames intro and many fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut4
1 files changed, 2 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut
index 5fb0778c..5756bb53 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_powerup.gnut
@@ -48,7 +48,8 @@ void function PowerupSpawnerThink( entity spawnpoint, PowerUp powerupDef )
powerup.SetOrigin( base.GetOrigin() + powerupDef.modelOffset )
powerup.SetAngles( base.GetAngles() + powerupDef.modelAngles )
powerup.SetValueForModelKey( powerupDef.model )
-
+ powerup.s.powerupRef <- powerupDef.itemRef // this needs to be done before dispatchspawn since OnPowerupCollected will run as soon as we call dispatchspawn if there's a player on battery as it spawns
+
DispatchSpawn( powerup )
// unless i'm doing something really dumb, this all has to be done after dispatchspawn to get the powerup to not have gravity
@@ -57,7 +58,6 @@ void function PowerupSpawnerThink( entity spawnpoint, PowerUp powerupDef )
powerup.SetAngles( base.GetAngles() + powerupDef.modelAngles )
powerup.SetModel( powerupDef.model )
- powerup.s.powerupRef <- powerupDef.itemRef
PickupGlow glow = CreatePickupGlow( powerup, powerupDef.glowColor.x.tointeger(), powerupDef.glowColor.y.tointeger(), powerupDef.glowColor.z.tointeger() )
glow.glowFX.SetOrigin( spawnpoint.GetOrigin() ) // want the glow to be parented to the powerup, but have the position of the spawnpoint