-void playerdemo_open_read(string f)
-{SELFPARAM();
- playerdemo_shutdown();
- self.playerdemo_mode = PLAYERDEMO_MODE_READING;
- self.playerdemo_fh = fopen(f, FILE_READ);
- self.playerdemo_starttime = time - 1;
- self.playerdemo_time = stof(fgets(self.playerdemo_fh));
- self.playerdemo_time += self.playerdemo_starttime;
- self.movetype = MOVETYPE_NONE;
- LOG_INFO("playerdemo: ", self.netname, " reading from ", f, "\n");
-}
-void playerdemo_open_write(string f)
-{SELFPARAM();
- playerdemo_shutdown();
- self.playerdemo_mode = PLAYERDEMO_MODE_WRITING;
- self.playerdemo_fh = fopen(f, FILE_WRITE);
- self.playerdemo_starttime = time - 1;
- LOG_INFO("playerdemo: ", self.netname, " writing to ", f, "\n");
+void playerdemo_open_read(entity this, string f)
+{
+ playerdemo_shutdown(this);
+ this.playerdemo_mode = PLAYERDEMO_MODE_READING;
+ this.playerdemo_fh = fopen(f, FILE_READ);
+ this.playerdemo_starttime = time - 1;
+ this.playerdemo_time = stof(fgets(this.playerdemo_fh));
+ this.playerdemo_time += this.playerdemo_starttime;
+ this.movetype = MOVETYPE_NONE;
+ LOG_INFO("playerdemo: ", this.netname, " reading from ", f, "\n");
+}
+void playerdemo_open_write(entity this, string f)
+{
+ playerdemo_shutdown(this);
+ this.playerdemo_mode = PLAYERDEMO_MODE_WRITING;
+ this.playerdemo_fh = fopen(f, FILE_WRITE);
+ this.playerdemo_starttime = time - 1;
+ LOG_INFO("playerdemo: ", this.netname, " writing to ", f, "\n");