// of controlled animation, so let's just use linear movement.
// Alternatively entities can choose to specify non-controlled movement.
// The only currently implemented alternative movement is linear (value 1)
- if (traveltime < 0.15 || self.platmovetype_start || self.platmovetype_end) // is this correct?
+ if (traveltime < 0.15 || (self.platmovetype_start == 1 && self.platmovetype_end == 1)) // is this correct?
{
self.velocity = delta * (1/traveltime); // QuakeC doesn't allow vector/float division
self.nextthink = self.ltime + traveltime;
if (!self.wait)
self.wait = 0.1;
- if(targ.platmovetype_start || targ.platmovetype_end)
+ if(targ.platmovetype)
{
// this path_corner contains a movetype overrider, apply it
self.platmovetype_start = targ.platmovetype_start;
self.dmgtime = 0.25;
self.dmgtime2 = time;
- set_platmovetype(self, self.platmovetype);
+ if(!set_platmovetype(self, self.platmovetype))
+ return;
self.platmovetype_start_default = self.platmovetype_start;
self.platmovetype_end_default = self.platmovetype_end;