From 7db3ccbb2cd08e0acbdf9aced3d72ed2fd0dea0d Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 20 Feb 2017 23:42:57 +1000 Subject: [PATCH] Make sure conveyor isn't added to the drawables list multiple times --- qcsrc/common/triggers/func/conveyor.qc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/triggers/func/conveyor.qc b/qcsrc/common/triggers/func/conveyor.qc index 90328da23..edd8eb9a2 100644 --- a/qcsrc/common/triggers/func/conveyor.qc +++ b/qcsrc/common/triggers/func/conveyor.qc @@ -154,10 +154,11 @@ spawnfunc(func_conveyor) void conveyor_draw(entity this) { conveyor_think(this); } -void conveyor_init(entity this) +void conveyor_init(entity this, bool isnew) { + if(isnew) + IL_PUSH(g_drawables, this); this.draw = conveyor_draw; - IL_PUSH(g_drawables, this); this.drawmask = MASK_NORMAL; set_movetype(this, MOVETYPE_NONE); @@ -196,7 +197,7 @@ NET_HANDLE(ENT_CLIENT_CONVEYOR, bool isnew) this.targetname = strzone(ReadString()); this.target = strzone(ReadString()); - conveyor_init(this); + conveyor_init(this, isnew); } if(sf & 2) -- 2.39.2