X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fplayerdemo.qc;h=9e335a331f8166fc37b48d2ef10e0160d35c9b05;hb=68d68e5cbc145772438bfdd775302b91f442f029;hp=f3e03424b18eb4f5f4e7c2eb2b7228aea92784da;hpb=1d0313b550f20ceef79a51c4c8a2029eb673d979;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/playerdemo.qc b/qcsrc/server/playerdemo.qc index f3e03424b..9e335a331 100644 --- a/qcsrc/server/playerdemo.qc +++ b/qcsrc/server/playerdemo.qc @@ -1,3 +1,4 @@ +#include "playerdemo.qh" #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) @@ -12,9 +13,9 @@ const float PLAYERDEMO_MODE_OFF = 0; const float PLAYERDEMO_MODE_READING = 1; const float PLAYERDEMO_MODE_WRITING = 2; -void playerdemo_init() -{SELFPARAM(); - self.playerdemo_mode = PLAYERDEMO_MODE_OFF; +void playerdemo_init(entity this) +{ + this.playerdemo_mode = PLAYERDEMO_MODE_OFF; } void playerdemo_shutdown() {SELFPARAM(); @@ -58,12 +59,12 @@ void playerdemo_open_write(string f) PLAYERDEMO_FIELD(func,string,playerskin) \ PLAYERDEMO_FIELD(func,float,frame) \ PLAYERDEMO_FIELD(func,float,effects) \ - PLAYERDEMO_FIELD(func,float,switchweapon) \ - PLAYERDEMO_FIELD(func,float,BUTTON_ATCK) \ - PLAYERDEMO_FIELD(func,float,BUTTON_ATCK2) \ - PLAYERDEMO_FIELD(func,float,BUTTON_CROUCH) \ - PLAYERDEMO_FIELD(func,float,BUTTON_HOOK) \ - PLAYERDEMO_FIELD(func,float,BUTTON_USE) \ + /* PLAYERDEMO_FIELD(func,float,switchweapon) */ \ + PLAYERDEMO_FIELD(func,float,button0) /* TODO: PHYS_INPUT_BUTTON_ATCK */ \ + PLAYERDEMO_FIELD(func,float,button3) /* TODO: PHYS_INPUT_BUTTON_ATCK2 */ \ + PLAYERDEMO_FIELD(func,float,button5) /* TODO: PHYS_INPUT_BUTTON_CROUCH */ \ + PLAYERDEMO_FIELD(func,float,button6) /* TODO: PHYS_INPUT_BUTTON_HOOK */ \ + PLAYERDEMO_FIELD(func,float,buttonuse) /* TODO: PHYS_INPUT_BUTTON_USE */ \ PLAYERDEMO_FIELD(func,float,flags) \ // end of list @@ -146,9 +147,9 @@ float playerdemo_read(entity this) PLAYERDEMO_FIELDS(playerdemo_read_) { time = this.playerdemo_time; - WITH(entity, this, this, PlayerPreThink()); + WITH(entity, self, this, PlayerPreThink()); // not running physics though... this is just so we can run weapon stuff - WITH(entity, this, this, PlayerPostThink()); + WITH(entity, self, this, PlayerPostThink()); } this.playerdemo_time = stof(fgets(this.playerdemo_fh)); if(this.playerdemo_time == 0)