X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fviewloc.qc;h=65deb3963d804c6ce7b9e71e2cc7a4cdc659958b;hb=2e4b6fcb1aec544934a31bd49bba5eeecaffbf86;hp=de2d3aac287ef32783b120cd57a28ea49f0211aa;hpb=a240e0309a8ec5837f3ac3d37c168f5262e53d5b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index de2d3aac2..65deb3963 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -38,8 +38,8 @@ void viewloc_think() self.nextthink = time; } -bool trigger_viewloc_send(entity to, int sf) -{SELFPARAM(); +bool trigger_viewloc_send(entity this, entity to, int sf) +{ // CSQC doesn't need to know our origin (yet), as we're only available for referencing WriteByte(MSG_ENTITY, ENT_CLIENT_VIEWLOC_TRIGGER); @@ -80,8 +80,8 @@ void viewloc_init() self.nextthink = time; } -void spawnfunc_trigger_viewlocation() -{SELFPARAM(); +spawnfunc(trigger_viewlocation) +{ // we won't check target2 here yet, as it may not even need to exist if(self.target == "") { LOG_INFO("^1FAIL!\n"); remove(self); return; } @@ -89,8 +89,8 @@ void spawnfunc_trigger_viewlocation() InitializeEntity(self, viewloc_init, INITPRIO_FINDTARGET); } -bool viewloc_send(entity to, int sf) -{SELFPARAM(); +bool viewloc_send(entity this, entity to, int sf) +{ WriteByte(MSG_ENTITY, ENT_CLIENT_VIEWLOC); WriteByte(MSG_ENTITY, self.cnt); @@ -114,21 +114,21 @@ void viewloc_link() Net_LinkEntity(self, false, 0, viewloc_send); } -void spawnfunc_target_viewlocation_start() -{SELFPARAM(); +spawnfunc(target_viewlocation_start) +{ self.classname = "target_viewlocation_start"; self.cnt = 1; viewloc_link(); } -void spawnfunc_target_viewlocation_end() -{SELFPARAM(); +spawnfunc(target_viewlocation_end) +{ self.classname = "target_viewlocation_end"; self.cnt = 2; viewloc_link(); } // compatibility -void spawnfunc_target_viewlocation() { spawnfunc_target_viewlocation_start(); } +spawnfunc(target_viewlocation) { spawnfunc_target_viewlocation_start(this); } #elif defined(CSQC)