01-05-2018, 06:26 AM
(This post was last modified: 01-05-2018, 06:26 AM by kremlin. Edited 1 time in total.)
another small kremfix for you
thanks to mbc for this fix:
this fixes pods shooting themselves (Maybe)
thanks to mbc for this fix:
Quote:mbc: ok suggestion kremlin
[9:20 PM] mbc: i'm pretty sure that playsound uses LAGCHECK() somewhere
[9:20 PM] mbc: in other words, it contains a sleep() call
[9:20 PM] kremlin: ahahahah
[9:20 PM] mbc: creating a race condition on P.shooter = shooter
[9:21 PM] kremlin: yeah
[9:21 PM] mbc: so you should move the playsound to the bottom of that proc
[9:21 PM] kremlin: well
[9:21 PM] kremlin: i can sure do that but
[9:21 PM] kremlin: i can't trigger the condition to test anyways
[9:21 PM] mbc: or i mean... we should do that
Code:
diff --git a/code/datums/projectiles/projectile_parent.dm b/code/datums/projectiles/projectile_parent.dm
index a25c9f0..574fc78 100644
--- a/code/datums/projectiles/projectile_parent.dm
+++ b/code/datums/projectiles/projectile_parent.dm
@@ -697,6 +697,8 @@ datum/projectile/snowball
P.set_loc(S)
P.proj_data = DATA
+ P.shooter = shooter
+ P.name = DATA.name
if (narrator_mode)
playsound(S, 'sound/vox/shoot.ogg', 50, 1)
@@ -715,8 +717,6 @@ datum/projectile/snowball
P.implanted = DATA.implanted
P.set_icon()
- P.shooter = shooter
- P.name = DATA.name
P.setMaterial(DATA.material)
P.power = DATA.power
@@ -777,4 +777,4 @@ datum/projectile/snowball
Q.mob_shooter = P.shooter
Q.name = "reflected [Q.name]"
Q.launch()
- return Q
\ No newline at end of file
+ return Q
this fixes pods shooting themselves (Maybe)