+#include "movetypes.qh"
#include "../player.qh"
#if defined(CSQC)
#include <client/defs.qh>
#include <common/stats.qh>
#include <common/util.qh>
- #include "movetypes.qh"
#include <lib/csqcmodel/common.qh>
#include <common/t_items.qh>
#elif defined(MENUQC)
#ifdef SVQC
void set_movetype(entity this, int mt)
{
- if(mt == MOVETYPE_PHYSICS || mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH)
- {
- this.movetype = this.move_movetype = mt; // we still set move_movetype, for other code that checks movetype
+ this.move_movetype = mt;
+ if (mt == MOVETYPE_PHYSICS || mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH) {
this.move_qcphysics = false;
- return;
}
-
- this.move_movetype = mt;
-
- if(!this.move_qcphysics)
- this.movetype = mt;
+ this.movetype = (this.move_qcphysics) ? MOVETYPE_NONE : mt;
}
#elif defined(CSQC)
void set_movetype(entity this, int mt)
X(17)
#undef X
{
- LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+ LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)",
etof(this), this.classname, vtos(this.origin));
return false;
}
}
- LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+ LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)",
etof(this), this.classname, vtos(this.origin));
_Movetype_LinkEdict(this, true);
return true;
{
v_forward = v_right = v_up = '0 0 0';
- float y = myangles.y * (M_PI * 2 / 360);
- float sy = sin(y);
- float cy = cos(y);
+ float yy = myangles.y * (M_PI * 2 / 360);
+ float sy = sin(yy);
+ float cy = cos(yy);
float p = myangles.x * (M_PI * 2 / 360);
float sp = sin(p);
float cp = cos(p);
{
case MOVETYPE_PUSH:
case MOVETYPE_FAKEPUSH:
- LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!\n");
+ LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
break;
case MOVETYPE_NONE:
break;
{
case MOVETYPE_PUSH:
case MOVETYPE_FAKEPUSH:
- LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!\n");
+ LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!");
break;
case MOVETYPE_NONE:
break;