X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fsv_generator.qc;h=1b1619bc44f621458c912c56c8f80573ab1f49c6;hb=7666560c6a475aefe6b55ff74a20444f328e0093;hp=cf8d234a3a295c4c2dfb0ec4e91eccdfc6a21f23;hpb=e9f30b97435c6afe3d6911f21e1f4fd1b97e93da;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_generator.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_generator.qc index cf8d234a3..1b1619bc4 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_generator.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_generator.qc @@ -6,32 +6,25 @@ bool generator_send(entity this, entity to, int sf) WriteByte(MSG_ENTITY, sf); if(sf & GSF_SETUP) { - WriteCoord(MSG_ENTITY, self.origin_x); - WriteCoord(MSG_ENTITY, self.origin_y); - WriteCoord(MSG_ENTITY, self.origin_z); + WriteCoord(MSG_ENTITY, this.origin_x); + WriteCoord(MSG_ENTITY, this.origin_y); + WriteCoord(MSG_ENTITY, this.origin_z); - WriteByte(MSG_ENTITY, self.health); - WriteByte(MSG_ENTITY, self.max_health); - WriteByte(MSG_ENTITY, self.count); - WriteByte(MSG_ENTITY, self.team); + WriteByte(MSG_ENTITY, this.health); + WriteByte(MSG_ENTITY, this.max_health); + WriteByte(MSG_ENTITY, this.count); + WriteByte(MSG_ENTITY, this.team); } if(sf & GSF_STATUS) { - WriteByte(MSG_ENTITY, self.team); + WriteByte(MSG_ENTITY, this.team); - if(self.health <= 0) + if(this.health <= 0) WriteByte(MSG_ENTITY, 0); else - WriteByte(MSG_ENTITY, ceil((self.health / self.max_health) * 255)); + WriteByte(MSG_ENTITY, ceil((this.health / this.max_health) * 255)); } return true; } - -void generator_link(void() spawnproc) -{SELFPARAM(); - Net_LinkEntity(self, true, 0, generator_send); - self.think = spawnproc; - self.nextthink = time; -}