]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Implement move_qcphysics
authorMario <mario@smbclan.net>
Sat, 23 Jul 2016 12:02:26 +0000 (22:02 +1000)
committerMario <mario@smbclan.net>
Sat, 23 Jul 2016 12:02:26 +0000 (22:02 +1000)
88 files changed:
qcsrc/client/csqc_constants.qh
qcsrc/client/main.qc
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/debug.qh
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/cl_controlpoint.qc
qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nades/net.qc
qcsrc/common/mutators/mutator/overkill/overkill.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/mutators/mutator/physical_items/physical_items.qc
qcsrc/common/mutators/mutator/sandbox/sandbox.qc
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/movetypes.qh
qcsrc/common/physics/player.qc
qcsrc/common/physics/player.qh
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/plat.qc
qcsrc/common/triggers/func/rainsnow.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/follow.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/phaser_weapon.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/turrets/util.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/lib/warpzone/server.qc
qcsrc/lib/warpzone/util_server.qc
qcsrc/server/bot/aim.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_world.qc
qcsrc/server/item_key.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/playerdemo.qc
qcsrc/server/steerlib.qc
qcsrc/server/sv_main.qc
qcsrc/server/weapons/csqcprojectile.qc

index 2ea1e746f7c60e12104563d3dd2751ff66bb2fcc..d8906b12ba466a2f0bef24b191e4935e0e30a58e 100644 (file)
@@ -132,7 +132,7 @@ const int SOLID_CORPSE      = 5; // same as SOLID_BBOX, except it behaves as SOLID_N
 
 const int MOVE_NORMAL = 0; // same as false
 const int MOVE_NOMONSTERS = 1; // same as true
-const int MOVE_MISSILE = 2; // save as movement with .movetype == MOVETYPE_FLYMISSILE
+const int MOVE_MISSILE = 2; // save as movement with .move_movetype == MOVETYPE_FLYMISSILE
 const int MOVE_HITMODEL = 4;
 const int MOVE_WORLDONLY = 3;
 
index c96b3c8bdd6e17dc7678b949021f805ce6230584..65ee03aaf8e6a0fce7741ea346d101c11a5289e0 100644 (file)
@@ -699,7 +699,7 @@ NET_HANDLE(ENT_CLIENT_SPAWNPOINT, bool is_new)
                        precache_model(this.mdl);
                        setmodel(this, this.mdl);
                        this.drawmask = MASK_NORMAL;
-                       //this.movetype = MOVETYPE_NOCLIP;
+                       //this.move_movetype = MOVETYPE_NOCLIP;
                        //this.draw = Spawn_Draw;
                }*/
                if(autocvar_cl_spawn_point_particles)
index ff890afec629db9f70bf333cc0fbbc053659afc3..39cec43225ea9ff430422133ea0d7ae91df4a844 100644 (file)
@@ -28,7 +28,7 @@
 # define TAG_VIEWLOC_NAME viewloc
 # define TAG_VIEWLOC_TYPE entity
 
-# define MOVETYPE_NAME movetype
+# define MOVETYPE_NAME move_movetype
 #endif
 
 // new fields
index 9aca8e774c34a669cf3439f6656914c703b7a0a3..2833acc2377c26241aac7d69bab4fd814984f76f 100644 (file)
@@ -100,7 +100,7 @@ bool autocvar_debugdraw;
 //                                             if (it.entnum) break;
 //                                             if (it.drawmask) break;
 //                                             if (it.predraw) break;
-//                                             if (it.movetype) break;
+//                                             if (it.move_movetype) break;
                                                if (it.solid) break;
 //                                             if (it.origin) break;
 //                                             if (it.oldorigin) break;
index 07479cc19714a13487c7ed49fc49ae41bc93e089..21d2d858b08b038a9f2d0d250493bb889f47601b 100644 (file)
@@ -178,7 +178,7 @@ void GiveBall(entity plyr, entity ball)
        ball.effects &= ~autocvar_g_nexball_basketball_effects_default;
 
        ball.velocity = '0 0 0';
-       ball.movetype = MOVETYPE_NONE;
+       set_movetype(ball, MOVETYPE_NONE);
        settouch(ball, func_null);
        ball.effects |= EF_NOSHADOW;
        ball.scale = 1; // scale down.
@@ -209,7 +209,7 @@ void DropBall(entity ball, vector org, vector vel)
 
        setattachment(ball, NULL, "");
        setorigin(ball, org);
-       ball.movetype = MOVETYPE_BOUNCE;
+       set_movetype(ball, MOVETYPE_BOUNCE);
        UNSET_ONGROUND(ball);
        ball.scale = ball_scale;
        ball.velocity = vel;
@@ -237,7 +237,7 @@ void InitBall(entity this)
 {
        if(gameover) return;
        UNSET_ONGROUND(this);
-       this.movetype = MOVETYPE_BOUNCE;
+       set_movetype(this, MOVETYPE_BOUNCE);
        if(this.classname == "nexball_basketball")
                settouch(this, basketball_touch);
        else if(this.classname == "nexball_football")
@@ -261,7 +261,7 @@ void ResetBall(entity this)
                        bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n");
 
                settouch(this, func_null);
-               this.movetype = MOVETYPE_NOCLIP;
+               set_movetype(this, MOVETYPE_NOCLIP);
                this.velocity = '0 0 0'; // just in case?
                if(!this.cnt)
                        LogNB("resetidle", NULL);
@@ -283,7 +283,7 @@ void ResetBall(entity this)
                                   vtos(this.origin - this.spawnorigin), " Velocity: ", vtos(this.velocity), "\n");
                this.velocity = '0 0 0';
                setorigin(this, this.spawnorigin); // make sure it's positioned correctly anyway
-               this.movetype = MOVETYPE_NONE;
+               set_movetype(this, MOVETYPE_NONE);
                setthink(this, InitBall);
                this.nextthink = max(time, game_starttime) + autocvar_g_nexball_delay_start;
        }
@@ -549,7 +549,7 @@ void SpawnBall(entity this)
                this.glow_trail = true;
        }
 
-       this.movetype = MOVETYPE_FLY;
+       set_movetype(this, MOVETYPE_FLY);
 
        if(!autocvar_g_nexball_sound_bounce)
                this.noise = "";
@@ -818,7 +818,7 @@ void W_Nexball_Attack2(entity actor)
 
        missile.owner = actor;
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
 
        //setmodel(missile, "models/elaser.mdl");  // precision set below
index bbd3f03b3a980b926c2af4caef73c8a038c1431d..013479242bb1b0a5a69857f635ed8b324b09f83f 100644 (file)
@@ -117,7 +117,7 @@ void cpicon_construct(entity this)
                setmodel(this.icon_realmodel, MDL_Null);
                setorigin(this.icon_realmodel, this.origin);
                setsize(this.icon_realmodel, CPICON_MIN, CPICON_MAX);
-               this.icon_realmodel.movetype = MOVETYPE_NOCLIP;
+               this.icon_realmodel.move_movetype = MOVETYPE_NOCLIP;
                this.icon_realmodel.solid = SOLID_NOT;
        }
 
@@ -125,7 +125,7 @@ void cpicon_construct(entity this)
 
        this.move_movetype      = MOVETYPE_NOCLIP;
        this.solid                      = SOLID_NOT;
-       this.movetype           = MOVETYPE_NOCLIP;
+       this.move_movetype              = MOVETYPE_NOCLIP;
        this.move_time          = time;
        this.drawmask           = MASK_NORMAL;
        this.alpha                      = 1;
index 30ecfb1ac329f141a1f926f0eaebaccb73959530..a22815b1682e18eea42f40204b988990d37441a0 100644 (file)
@@ -33,7 +33,7 @@ void ons_generator_ray_spawn(vector org)
        setmodel(e, MDL_ONS_RAY);
        setorigin(e, org);
        e.angles = randomvec() * 360;
-       e.movetype = MOVETYPE_NONE;
+       e.move_movetype = MOVETYPE_NONE;
        e.alpha = 0;
        e.scale = random() * 5 + 8;
        e.move_time = time + 0.05;
@@ -153,7 +153,7 @@ void generator_construct(entity this)
 
        this.move_movetype      = MOVETYPE_NOCLIP;
        this.solid                      = SOLID_BBOX;
-       this.movetype           = MOVETYPE_NOCLIP;
+       this.move_movetype              = MOVETYPE_NOCLIP;
        this.move_time          = time;
        this.drawmask           = MASK_NORMAL;
        this.alpha                      = 1;
index 7d9c93d94c24f2602ed0e83f2e115ef10a2dd133..6242414ae0b275e8b1ded5dcf01880e6c4a32bee 100644 (file)
@@ -211,7 +211,7 @@ void ons_CaptureShield_Spawn(entity generator, bool is_generator)
        settouch(shield, ons_CaptureShield_Touch);
        setcefc(shield, ons_CaptureShield_Customize);
        shield.effects = EF_ADDITIVE;
-       shield.movetype = MOVETYPE_NOCLIP;
+       set_movetype(shield, MOVETYPE_NOCLIP);
        shield.solid = SOLID_TRIGGER;
        shield.avelocity = '7 0 11';
        shield.scale = 1;
@@ -863,7 +863,7 @@ void ons_ControlPoint_Setup(entity cp)
        cp.netname = "Control point";
        cp.team = 0;
        cp.solid = SOLID_BBOX;
-       cp.movetype = MOVETYPE_NONE;
+       set_movetype(cp, MOVETYPE_NONE);
        settouch(cp, ons_ControlPoint_Touch);
        setthink(cp, ons_ControlPoint_Think);
        cp.nextthink = time + ONS_CP_THINKRATE;
@@ -882,14 +882,14 @@ void ons_ControlPoint_Setup(entity cp)
        if((cp.spawnflags & 1) || cp.noalign) // don't drop to floor, just stay at fixed location
        {
                cp.noalign = true;
-               cp.movetype = MOVETYPE_NONE;
+               set_movetype(cp, MOVETYPE_NONE);
        }
        else // drop to floor, automatically find a platform and set that as spawn origin
        {
                setorigin(cp, cp.origin + '0 0 20');
                cp.noalign = false;
                droptofloor(cp);
-               cp.movetype = MOVETYPE_TOSS;
+               set_movetype(cp, MOVETYPE_TOSS);
        }
 
        // waypointsprites
@@ -1105,7 +1105,7 @@ void ons_GeneratorSetup(entity gen) // called when spawning a generator entity o
        gen.classname = "onslaught_generator";
        gen.solid = SOLID_BBOX;
        gen.team_saved = teamnumber;
-       gen.movetype = MOVETYPE_NONE;
+       set_movetype(gen, MOVETYPE_NONE);
        gen.lasthealth = gen.max_health = gen.health = autocvar_g_onslaught_gen_health;
        gen.takedamage = DAMAGE_AIM;
        gen.bot_attack = true;
index 992eab054b0b6aa1fe3a497080b50e10ee0a8e64..0d0efb05dcdf0b201b00191371b8cbb79d7bc9ac 100644 (file)
@@ -5,9 +5,9 @@ void player_clear_minigame(entity player)
        player.active_minigame = NULL;
        player.minigame_players = NULL;
        if ( IS_PLAYER(player) )
-               player.movetype = MOVETYPE_WALK;
+               set_movetype(player, MOVETYPE_WALK);
        else
-               player.movetype = MOVETYPE_FLY_WORLDONLY;
+               set_movetype(player, MOVETYPE_FLY_WORLDONLY);
        player.team_forced = 0;
 }
 
index 46a9fb18e41b7d6a45385067249e8adfeab1bdfa..65c82ab37dbaaeb7216c1118e259ccecead06470 100644 (file)
@@ -233,7 +233,7 @@ void M_Mage_Attack_Spike(entity this, vector dir)
        missile.ltime = time + 7;
        missile.nextthink = time;
        missile.solid = SOLID_BBOX;
-       missile.movetype = MOVETYPE_FLYMISSILE;
+       set_movetype(missile, MOVETYPE_FLYMISSILE);
        missile.flags = FL_PROJECTILE;
        setorigin(missile, this.origin + v_forward * 14 + '0 0 30' + v_right * -14);
        setsize(missile, '0 0 0', '0 0 0');
index dd9a61d4183a5765b34a69628739e619a4bf5b74..afbb954c0b3590f7f42925b7525570ddb8e7256e 100644 (file)
@@ -85,10 +85,10 @@ void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity)
 
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.velocity = '0 0 0';
 
-       if(this.movetype == MOVETYPE_NONE)
+       if(this.move_movetype == MOVETYPE_NONE)
                this.velocity = this.oldvelocity;
 
        RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), 
@@ -150,7 +150,7 @@ void M_Shambler_Attack_Lightning(entity this)
        gren.owner = gren.realowner = this;
        gren.bot_dodge = true;
        gren.bot_dodgerating = (autocvar_g_monster_shambler_attack_lightning_damage);
-       gren.movetype = MOVETYPE_BOUNCE;
+       set_movetype(gren, MOVETYPE_BOUNCE);
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = DEATH_MONSTER_SHAMBLER_ZAP.m_id;
        setorigin(gren, CENTER_OR_VIEWOFS(this));
index b6d41dbb424b76b7c85ae3ef4beb2af9fe5d0aeb..c7ffece15158c36af25677639988bdb42d2bf7be 100644 (file)
@@ -185,7 +185,7 @@ void M_Spider_Attack_Web(entity this)
 
        //proj.glow_size = 50;
        //proj.glow_color = 45;
-       proj.movetype = MOVETYPE_BOUNCE;
+       set_movetype(proj, MOVETYPE_BOUNCE);
        W_SetupProjVelocity_Explicit(proj, v_forward, v_up, (autocvar_g_monster_spider_attack_web_speed), (autocvar_g_monster_spider_attack_web_speed_up), 0, 0, false);
        settouch(proj, M_Spider_Attack_Web_Touch);
        setsize(proj, '-4 -4 -4', '4 4 4');
index 345d6459cda6a374638121d8d6a66bf7ffd152bf..53d08effa84a0e387dd3ebec1dac8911aacf3c48 100644 (file)
@@ -64,7 +64,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity
                entity missile = spawn();
                missile.owner = missile.realowner = actor;
                missile.solid = SOLID_TRIGGER;
-               missile.movetype = MOVETYPE_FLYMISSILE;
+               set_movetype(missile, MOVETYPE_FLYMISSILE);
                missile.projectiledeathtype = DEATH_MONSTER_WYVERN.m_id;
                setsize(missile, '-6 -6 -6', '6 6 6');
                setorigin(missile, actor.origin + actor.view_ofs + v_forward * 14);
index 005f128b9b5a469451c98b5c7c60029b3f8632eb..4013e9d4f54495c10a03afa3c126bc8754943be2 100644 (file)
@@ -50,7 +50,7 @@ void monster_dropitem(entity this, entity attacker)
                e.noalign = true;
                e.monster_loot(e);
                e.gravity = 1;
-               e.movetype = MOVETYPE_TOSS;
+               set_movetype(e, MOVETYPE_TOSS);
                e.reset = SUB_Remove;
                setorigin(e, org);
                e.velocity = randomvec() * 175 + '0 0 325';
@@ -763,15 +763,15 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
                        }
 
 
-                       this.movetype = MOVETYPE_BOUNCE;
+                       set_movetype(this, MOVETYPE_BOUNCE);
                        //this.velocity_z = -200;
 
                        return;
                }
-               else if(this.movetype == MOVETYPE_BOUNCE)
+               else if(this.move_movetype == MOVETYPE_BOUNCE)
                {
                        this.angles_x = 0;
-                       this.movetype = MOVETYPE_WALK;
+                       set_movetype(this, MOVETYPE_WALK);
                }
        }
 
@@ -1010,7 +1010,7 @@ void Monster_Dead(entity this, entity attacker, float gibbed)
        this.takedamage         = DAMAGE_AIM;
        this.deadflag           = DEAD_DEAD;
        this.enemy                      = NULL;
-       this.movetype           = MOVETYPE_TOSS;
+       this.move_movetype              = MOVETYPE_TOSS;
        this.moveto                     = this.origin;
        settouch(this, Monster_Touch); // reset incase monster was pouncing
        this.reset                      = func_null;
@@ -1320,7 +1320,7 @@ bool Monster_Spawn(entity this, int mon_id)
        settouch(this, Monster_Touch);
        this.use                                = Monster_Use;
        this.solid                              = SOLID_BBOX;
-       this.movetype                   = MOVETYPE_WALK;
+       this.move_movetype                      = MOVETYPE_WALK;
        this.spawnshieldtime    = time + autocvar_g_monsters_spawnshieldtime;
        this.enemy                              = NULL;
        this.velocity                   = '0 0 0';
@@ -1355,7 +1355,7 @@ bool Monster_Spawn(entity this, int mon_id)
        if(mon.spawnflags & MONSTER_TYPE_FLY)
        {
                this.flags |= FL_FLY;
-               this.movetype = MOVETYPE_FLY;
+               set_movetype(this, MOVETYPE_FLY);
        }
 
        if(!(this.spawnflags & MONSTERFLAG_RESPAWNED))
index 921cd03cd39dadbcf043cdfbcb8a203644f1ea02..5c2987e0e74922eac1b0e5c516cbaf6d2995e10b 100644 (file)
@@ -207,7 +207,7 @@ void buff_Respawn(entity this)
 
        setorigin(this, trace_endpos); // attempt to unstick
 
-       this.movetype = MOVETYPE_TOSS;
+       set_movetype(this, MOVETYPE_TOSS);
 
        makevectors(this.angles);
        this.angles = '0 0 0';
@@ -428,7 +428,7 @@ void buff_Init(entity this)
        this.reset = buff_Reset;
        this.nextthink = time + 0.1;
        this.gravity = 1;
-       this.movetype = MOVETYPE_TOSS;
+       set_movetype(this, MOVETYPE_TOSS);
        this.scale = 1;
        this.skin = buff.m_skin;
        this.effects = EF_FULLBRIGHT | EF_STARDUST | EF_NOSHADOW;
@@ -445,7 +445,7 @@ void buff_Init(entity this)
                this.noalign = true;
 
        if(this.noalign)
-               this.movetype = MOVETYPE_NONE; // reset by random location
+               set_movetype(this, MOVETYPE_NONE); // reset by random location
 
        setmodel(this, MDL_BUFF);
        setsize(this, BUFF_MIN, BUFF_MAX);
index 96490700e567ee5eb356678641f334e204639021..8631afabfdcf25d4267dfcc73b359e8f05f5bbf5 100644 (file)
@@ -214,13 +214,13 @@ void RaceCarPhysics(entity this)
                }
 
                this.velocity = (neworigin - this.origin) * (1.0 / PHYS_INPUT_TIMELENGTH);
-               this.movetype = MOVETYPE_NOCLIP;
+               set_movetype(this, MOVETYPE_NOCLIP);
        }
        else
        {
                rigvel_z -= PHYS_INPUT_TIMELENGTH * PHYS_GRAVITY(this); // 4x gravity plays better
                this.velocity = rigvel;
-               this.movetype = MOVETYPE_FLY;
+               set_movetype(this, MOVETYPE_FLY);
        }
 
        trace_fraction = 1;
index 7ba2f6f5bdb60ddee1dd7e7d3ff6419241810ff4..5570a1b084aa6befa6a67ca796e1dae109504c7a 100644 (file)
@@ -94,7 +94,7 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile)
                proj.maxs = '16 16 16';
        }
        proj.colormod = nade_type.m_color;
-       proj.move_movetype = MOVETYPE_BOUNCE;
+       set_movetype(proj, MOVETYPE_BOUNCE);
        settouch(proj, func_null);
        proj.scale = 1.5;
        proj.avelocity = randomvec() * 720;
@@ -273,7 +273,7 @@ void nade_napalm_ball(entity this)
        proj.team = this.owner.team;
        proj.bot_dodge = true;
        proj.bot_dodgerating = autocvar_g_nades_napalm_ball_damage;
-       proj.movetype = MOVETYPE_BOUNCE;
+       set_movetype(proj, MOVETYPE_BOUNCE);
        proj.projectiledeathtype = DEATH_NADE_NAPALM.m_id;
        PROJECTILE_MAKETRIGGER(proj);
        setmodel(proj, MDL_Null);
@@ -356,7 +356,7 @@ void nade_napalm_boom(entity this)
        fountain.ltime = time + autocvar_g_nades_napalm_fountain_lifetime;
        fountain.pushltime = fountain.ltime;
        fountain.team = this.team;
-       fountain.movetype = MOVETYPE_TOSS;
+       set_movetype(fountain, MOVETYPE_TOSS);
        fountain.projectiledeathtype = DEATH_NADE_NAPALM.m_id;
        fountain.bot_dodge = true;
        fountain.bot_dodgerating = autocvar_g_nades_napalm_fountain_damage;
@@ -448,7 +448,7 @@ void nade_ice_boom(entity this)
        fountain.ltime = time + autocvar_g_nades_ice_freeze_time;
        fountain.pushltime = fountain.wait = fountain.ltime;
        fountain.team = this.team;
-       fountain.movetype = MOVETYPE_TOSS;
+       set_movetype(fountain, MOVETYPE_TOSS);
        fountain.projectiledeathtype = DEATH_NADE_ICE.m_id;
        fountain.bot_dodge = false;
        setsize(fountain, '-16 -16 -16', '16 16 16');
@@ -494,7 +494,7 @@ void nade_spawn_boom(entity this)
        entity spawnloc = spawn();
        setorigin(spawnloc, this.origin);
        setsize(spawnloc, this.realowner.mins, this.realowner.maxs);
-       spawnloc.movetype = MOVETYPE_NONE;
+       set_movetype(spawnloc, MOVETYPE_NONE);
        spawnloc.solid = SOLID_NOT;
        spawnloc.drawonlytoclient = this.realowner;
        spawnloc.effects = EF_STARDUST;
@@ -907,7 +907,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time)
                setsize(_nade, '-8 -8 -8', '8 8 8');
        else
                setsize(_nade, '-16 -16 -16', '16 16 16');
-       _nade.movetype = MOVETYPE_BOUNCE;
+       set_movetype(_nade, MOVETYPE_BOUNCE);
 
        tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, false, _nade);
        if (trace_startsolid)
index 26ebd504e5ea22136f22262df80f31cf67ea61a5..cbb8e4abfc2fe62a7bf18b045c2b32c1bd22b95b 100644 (file)
@@ -30,7 +30,7 @@ void orb_setup(entity e)
 
        e.draw = orb_draw;
        e.health = 255;
-       e.movetype = MOVETYPE_NONE;
+       e.move_movetype = MOVETYPE_NONE;
        e.solid = SOLID_NOT;
        e.drawmask = MASK_NORMAL;
        e.scale = 0.01;
index 2fb75b3f8d9696b8ce644748f5f837d0e19a89f5..ef76ab51519ceb1f61ee16caefb622a4126e5816 100644 (file)
@@ -130,7 +130,7 @@ void ok_DropItem(entity this, entity targ)
        e.spawnfunc_checked = true;
        spawnfunc_item_armor_small(e);
        if (!wasfreed(e)) { // might have been blocked by a mutator
-        e.movetype = MOVETYPE_TOSS;
+        set_movetype(e, MOVETYPE_TOSS);
         e.gravity = 1;
         e.reset = SUB_Remove;
         setorigin(e, this.origin + '0 0 32');
index b14b6bce49131db750ec735987ce58290b9af0d2..4c59f183a39e53c41104d2c75edb64c107adbc40 100644 (file)
@@ -129,7 +129,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor)
        missile.health = WEP_CVAR(rpc, health);
        missile.event_damage = W_RocketPropelledChainsaw_Damage;
        missile.damagedbycontents = true;
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
 
        missile.projectiledeathtype = WEP_RPC.m_id;
        setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
index 6e4bfa566192ac65e5a83dba324d201bb4151fc1..8e9d4699e895c8ac33257ce54026472d8ac9e714 100644 (file)
@@ -53,13 +53,13 @@ void physical_item_think(entity this)
                                this.angles = this.spawn_angles;
                                this.solid = SOLID_NOT;
                                this.alpha = -1;
-                               this.movetype = MOVETYPE_NONE;
+                               set_movetype(this, MOVETYPE_NONE);
                        }
                        else
                        {
                                this.alpha = 1;
                                this.solid = SOLID_CORPSE;
-                               this.movetype = MOVETYPE_PHYSICS;
+                               set_movetype(this, MOVETYPE_PHYSICS);
                        }
                }
        }
@@ -109,7 +109,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
 
        wep.owner = item;
        wep.solid = SOLID_CORPSE;
-       wep.movetype = MOVETYPE_PHYSICS;
+       set_movetype(wep, MOVETYPE_PHYSICS);
        wep.takedamage = DAMAGE_AIM;
        wep.effects |= EF_NOMODELFLAGS; // disable the spinning
        wep.colormap = item.owner.colormap;
@@ -134,7 +134,7 @@ MUTATOR_HOOKFUNCTION(physical_items, Item_Spawn)
        wep.spawn_angles = item.angles;
 
        item.effects |= EF_NODRAW; // hide the original weapon
-       item.movetype = MOVETYPE_FOLLOW;
+       set_movetype(item, MOVETYPE_FOLLOW);
        item.aiment = wep; // attach the original weapon
        setSendEntity(item, func_null);
 }
index 973ff3151c739b2b5aec2cdc0c56ca83eedc8c1e..6adc964be48374e6d109f0e902a09406b2122b01 100644 (file)
@@ -129,8 +129,8 @@ void sandbox_ObjectAttach_Set(entity e, entity parent, string s)
        sandbox_ObjectAttach_Remove(e);
 
        e.old_solid = e.solid; // persist solidity
-       e.old_movetype = e.movetype; // persist physics
-       e.movetype = MOVETYPE_FOLLOW;
+       e.old_movetype = e.move_movetype; // persist physics
+       set_movetype(e, MOVETYPE_FOLLOW);
        e.solid = SOLID_NOT;
        e.takedamage = DAMAGE_NO;
 
@@ -156,7 +156,7 @@ void sandbox_ObjectAttach_Remove(entity e)
                it.angles = e.angles; // don't allow detached objects to spin or roll
 
                it.solid = it.old_solid; // restore persisted solidity
-               it.movetype = it.old_movetype; // restore persisted physics
+               set_movetype(it, it.old_movetype); // restore persisted physics
                it.takedamage = DAMAGE_AIM;
        });
 }
@@ -169,7 +169,7 @@ entity sandbox_ObjectSpawn(entity this, float database)
        e.takedamage = DAMAGE_AIM;
        e.damageforcescale = 1;
        e.solid = SOLID_BBOX; // SOLID_BSP would be best, but can lag the server badly
-       e.movetype = MOVETYPE_TOSS;
+       set_movetype(e, MOVETYPE_TOSS);
        e.frame = 0;
        e.skin = 0;
        e.material = string_null;
@@ -240,7 +240,7 @@ string sandbox_ObjectPort_Save(entity e, float database)
                {
                        slot = 0;
                        solidity = head.solid; // applied solidity is normal solidity for children
-                       physics = head.movetype; // applied physics are normal physics for parents
+                       physics = head.move_movetype; // applied physics are normal physics for parents
                }
                else if(head.owner == e) // child object, list them in order
                {
@@ -347,7 +347,8 @@ entity sandbox_ObjectPort_Load(entity this, string s, float database)
                e.frame = stof(argv(argv_num)); ++argv_num;
                sandbox_ObjectEdit_Scale(e, stof(argv(argv_num)));      ++argv_num;
                e.solid = e.old_solid = stof(argv(argv_num));   ++argv_num;
-               e.movetype = e.old_movetype = stof(argv(argv_num));     ++argv_num;
+               e.old_movetype = stof(argv(argv_num));  ++argv_num;
+               set_movetype(e, e.old_movetype);
                e.damageforcescale = stof(argv(argv_num));      ++argv_num;
                if(e.material)  strunzone(e.material);  if(argv(argv_num) != "")        e.material = strzone(argv(argv_num));   else    e.material = string_null;       ++argv_num;
                if(database)
@@ -683,13 +684,13 @@ MUTATOR_HOOKFUNCTION(sandbox, SV_ParseClientCommand)
                                                        switch(argv(3))
                                                        {
                                                                case "0": // static
-                                                                       e.movetype = MOVETYPE_NONE;
+                                                                       set_movetype(e, MOVETYPE_NONE);
                                                                        break;
                                                                case "1": // movable
-                                                                       e.movetype = MOVETYPE_TOSS;
+                                                                       set_movetype(e, MOVETYPE_TOSS);
                                                                        break;
                                                                case "2": // physical
-                                                                       e.movetype = MOVETYPE_PHYSICS;
+                                                                       set_movetype(e, MOVETYPE_PHYSICS);
                                                                        break;
                                                                default:
                                                                        break;
index 285bc164a02875547aa977f09bcf4520475a85eb..07f19206590fb4e0be5131ed351168659240e268 100644 (file)
        #include <server/autocvars.qh>
 #endif
 
+#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_qcphysics = false;
+               return;
+       }
+
+       this.move_movetype = mt;
+
+       if(!this.move_qcphysics)
+               this.movetype = mt;
+}
+#elif defined(CSQC)
+void set_movetype(entity this, int mt)
+{
+       this.move_movetype = mt;
+}
+#endif
+
 void _Movetype_WallFriction(entity this, vector stepnormal)  // SV_WallFriction
 {
        /*float d, i;
@@ -623,6 +645,20 @@ void _Movetype_Physics_ClientFrame(entity this, float movedt)
        }
 }
 
+void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient)  // to be run every move frame
+{
+       this.move_time = time;
+
+       if(isclient)
+               _Movetype_Physics_ClientFrame(this, movedt);
+       else
+               _Movetype_Physics_Frame(this, movedt);
+       if(wasfreed(this))
+               return;
+
+       setorigin(this, this.origin);
+}
+
 void Movetype_Physics_NoMatchServer(entity this)  // optimized
 {
        float movedt = time - this.move_time;
index 8b061e383fc949ddeffb1c7d26c309215a673dd6..e36eca9527450d8ba3c2f4721e09c08e965dcb99 100644 (file)
 .float bouncefactor;
 #endif
 
+#ifdef SVQC
+.bool move_qcphysics;
+#endif
+
+void set_movetype(entity this, int mt);
+
 .float move_movetype;
 .float move_time;
 //.vector move_origin;
@@ -46,6 +52,7 @@ void _Movetype_PushEntityTrace(entity this, vector push);
 float _Movetype_PushEntity(entity this, vector push, float failonstartsolid);
 void makevectors_matrix(vector myangles);
 
+void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient);
 void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy);
 void Movetype_Physics_MatchServer(entity this, bool sloppy);
 void Movetype_Physics_NoMatchServer(entity this);
index d010dfe6c7ee503c7f98b69878e4b6d43e178b47..0ce4777b3f9291cb098aeb9c8ac4e812fad1873a 100644 (file)
@@ -1381,24 +1381,24 @@ void PM_Main(entity this)
                if (!allowed_to_move)
                {
                        this.velocity = '0 0 0';
-                       this.movetype = MOVETYPE_NONE;
+                       set_movetype(this, MOVETYPE_NONE);
                        this.disableclientprediction = 2;
                }
                else if (this.disableclientprediction == 2)
                {
-                       if (this.movetype == MOVETYPE_NONE)
-                               this.movetype = MOVETYPE_WALK;
+                       if (this.move_movetype == MOVETYPE_NONE)
+                               set_movetype(this, MOVETYPE_WALK);
                        this.disableclientprediction = 0;
                }
        }
 #endif
 
 #ifdef SVQC
-       if (this.movetype == MOVETYPE_NONE)
+       if (this.move_movetype == MOVETYPE_NONE)
                return;
 
        // when we get here, disableclientprediction cannot be 2
-       this.disableclientprediction = 0;
+       this.disableclientprediction = -1;
 #endif
 
        viewloc_PlayerPhysics(this);
@@ -1523,7 +1523,7 @@ void PM_Main(entity this)
                { }
 
 #ifdef SVQC
-       else if (this.movetype == MOVETYPE_NOCLIP || this.movetype == MOVETYPE_FLY || this.movetype == MOVETYPE_FLY_WORLDONLY || MUTATOR_CALLHOOK(IsFlying, this))
+       else if (this.move_movetype == MOVETYPE_NOCLIP || this.move_movetype == MOVETYPE_FLY || this.move_movetype == MOVETYPE_FLY_WORLDONLY || MUTATOR_CALLHOOK(IsFlying, this))
 #elif defined(CSQC)
        else if (this.move_movetype == MOVETYPE_NOCLIP || this.move_movetype == MOVETYPE_FLY || this.move_movetype == MOVETYPE_FLY_WORLDONLY || MUTATOR_CALLHOOK(IsFlying, this))
 #endif
@@ -1564,4 +1564,8 @@ void CSQC_ClientMovement_PlayerMove_Frame(entity this)
 #endif
 {
        PM_Main(this);
+
+#ifdef SVQC
+       this.pm_frametime = frametime;
+#endif
 }
index de76bb8d8c234cbe8b17c35ed17711ec5f843f75..73d2ec932c86da5e5fe06aa702e9f38f95648007 100644 (file)
@@ -3,6 +3,8 @@
 
 // Client/server mappings
 
+.float pm_frametime;
+
 .entity conveyor;
 
 .float race_penalty;
index 3147354ea5554f9bc001c9e536198209cb752eac..0de2fe1cf5003da09c5a04d89fb8daccf4dfcbb3 100644 (file)
@@ -1077,7 +1077,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
        {
                this.reset = SUB_Remove;
                // it's a dropped weapon
-               this.movetype = MOVETYPE_TOSS;
+               set_movetype(this, MOVETYPE_TOSS);
 
                // Savage: remove thrown items after a certain period of time ("garbage collection")
                setthink(this, RemoveItem);
@@ -1118,9 +1118,9 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
                if(this.spawnflags & 1)
                        this.noalign = 1;
                if (this.noalign > 0)
-                       this.movetype = MOVETYPE_NONE;
+                       set_movetype(this, MOVETYPE_NONE);
                else
-                       this.movetype = MOVETYPE_TOSS;
+                       set_movetype(this, MOVETYPE_TOSS);
                // do item filtering according to game mode and other things
                if (this.noalign <= 0)
                {
index 1a65710a98346fcd1115b60ca06887e6282b7f87..6763701d31fa91d52468af4e71f657d0986313e7 100644 (file)
@@ -59,7 +59,7 @@ void LaunchDebris (entity this, string debrisname, vector force)
        dbr.skin = this.debrisskin;
        dbr.colormap = this.colormap; // inherit team colors
        dbr.owner = this; // do not be affected by our own explosion
-       dbr.movetype = this.debrismovetype;
+       set_movetype(dbr, this.debrismovetype);
        dbr.solid = this.debrissolid;
        if(dbr.solid != SOLID_BSP) // SOLID_BSP has exact collision, MAYBE this works? TODO check this out
                setsize(dbr, '0 0 0', '0 0 0'); // needed for performance, until engine can deal better with it
index bdb80fe14366db3c0ab39a208d709f09a7ab4a83..95f9ebc697a36932390a1856791be8adaa5134ad 100644 (file)
@@ -140,7 +140,7 @@ spawnfunc(func_conveyor)
 {
        SetMovedir(this);
        InitMovingBrushTrigger(this);
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        conveyor_init(this);
 }
 
@@ -153,7 +153,7 @@ void conveyor_init(entity this)
        this.draw = conveyor_draw;
        this.drawmask = MASK_NORMAL;
 
-       this.movetype = MOVETYPE_NONE;
+       this.move_movetype = MOVETYPE_NONE;
        this.model = "";
        this.solid = SOLID_TRIGGER;
        this.move_time = time;
index a27787634bf24a4f719d96d627ad89ea7539af8e..a0fb12a4c4806c10140a7f32645e75f6b190ae70 100644 (file)
@@ -441,7 +441,7 @@ void door_spawnfield(entity this, vector fmins, vector fmaxs)
        vector  t1 = fmins, t2 = fmaxs;
 
        trigger = new(doortriggerfield);
-       trigger.movetype = MOVETYPE_NONE;
+       set_movetype(trigger, MOVETYPE_NONE);
        trigger.solid = SOLID_TRIGGER;
        trigger.owner = this;
 #ifdef SVQC
@@ -815,7 +815,7 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
                this.SUB_LTIME = ReadCoord();
 
                this.solid = SOLID_BSP;
-               this.movetype = MOVETYPE_PUSH;
+               this.move_movetype = MOVETYPE_PUSH;
                this.use = door_use;
 
                LinkDoors(this);
index 86b7b388013d390e5297166e7d2f1fbd268e336a..07709df33e8cb0bbf31997724e3dfe2ecfb510d5 100644 (file)
@@ -168,7 +168,7 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew)
 
                this.classname = "plat";
                this.solid = SOLID_BSP;
-               this.movetype = MOVETYPE_PUSH;
+               this.move_movetype = MOVETYPE_PUSH;
                this.drawmask = MASK_NORMAL;
                this.draw = plat_draw;
                this.use = plat_use;
index 265d45e0a992768b33a982f5000d4e1ad7065739..d2cf18963a4af4f5d5fe8bcef658fa0873dec380 100644 (file)
@@ -35,7 +35,7 @@ spawnfunc(func_rain)
        if (!this.dest)
                this.dest = '0 0 -700';
        this.angles = '0 0 0';
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.solid = SOLID_NOT;
        SetBrushEntityModel(this);
        if (!this.cnt)
@@ -73,7 +73,7 @@ spawnfunc(func_snow)
        if (!this.dest)
                this.dest = '0 0 -300';
        this.angles = '0 0 0';
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.solid = SOLID_NOT;
        SetBrushEntityModel(this);
        if (!this.cnt)
index d9e1799fbd799cf5acc2858f51c2b1dfe449b197..6bf6b0b1a46428ea463293d10e5414e08b73703b 100644 (file)
@@ -307,7 +307,7 @@ NET_HANDLE(ENT_CLIENT_TRAIN, bool isnew)
 
                this.classname = "func_train";
                this.solid = SOLID_BSP;
-               this.movetype = MOVETYPE_PUSH;
+               this.move_movetype = MOVETYPE_PUSH;
                this.drawmask = MASK_NORMAL;
                this.draw = train_draw;
                this.entremove = trigger_remove_generic;
index 69222bf2d81a2ecf03113904c6c97c8053e4a0ac..fa242beb97ceb0fe6adec70a4bd34dee60468be3 100644 (file)
@@ -47,7 +47,7 @@ void follow_init(entity this)
        {
                if(this.spawnflags & 2)
                {
-                       dst.movetype = MOVETYPE_FOLLOW;
+                       set_movetype(dst, MOVETYPE_FOLLOW);
                        dst.aiment = src;
                        // dst.punchangle = '0 0 0'; // keep unchanged
                        dst.view_ofs = dst.origin;
index 324fd3676b2890bd4291ae36a3eb103797279b3d..391172fe0f157fc17a3585abd98dfc007df81737 100644 (file)
@@ -23,7 +23,7 @@ void plat_spawn_inside_trigger(entity this)
 
        trigger = spawn();
        settouch(trigger, plat_center_touch);
-       trigger.movetype = MOVETYPE_NONE;
+       set_movetype(trigger, MOVETYPE_NONE);
        trigger.solid = SOLID_TRIGGER;
        trigger.enemy = this;
 
index e2d6288bda494801c63155a4069181ee875151c3..a1a38d39e1a95e24459d2a2c4c1a5bb857c7de27 100644 (file)
@@ -234,7 +234,7 @@ void teleport_findtarget(entity this)
        {
                ++n;
 #ifdef SVQC
-               if(e.movetype == MOVETYPE_NONE)
+               if(e.move_movetype == MOVETYPE_NONE)
                        waypoint_spawnforteleporter(this, e.origin, 0);
                if(e.classname != "info_teleport_destination")
                        LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
index ffe3d4ee8ea42ab72b42cf5d95c0d891a81b4093..4a30ca69510d59a5c1aac0577f6a92fed64095d1 100644 (file)
@@ -235,14 +235,14 @@ void trigger_push_touch(entity this, entity toucher)
        if (toucher.flags & FL_PROJECTILE)
        {
                toucher.angles = vectoangles (toucher.velocity);
-               switch(toucher.movetype)
+               switch(toucher.move_movetype)
                {
                        case MOVETYPE_FLY:
-                               toucher.movetype = MOVETYPE_TOSS;
+                               set_movetype(toucher, MOVETYPE_TOSS);
                                toucher.gravity = 1;
                                break;
                        case MOVETYPE_BOUNCEMISSILE:
-                               toucher.movetype = MOVETYPE_BOUNCE;
+                               set_movetype(toucher, MOVETYPE_BOUNCE);
                                toucher.gravity = 1;
                                break;
                }
@@ -289,7 +289,7 @@ void trigger_push_findtarget(entity this)
                        setsize(e, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
                        e.velocity = trigger_push_calculatevelocity(org, t, this.height);
                        tracetoss(e, e);
-                       if(e.movetype == MOVETYPE_NONE)
+                       if(e.move_movetype == MOVETYPE_NONE)
                                waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity));
                        remove(e);
 #endif
index 7e433030879adb3fe08ff566cfe143a8a125038e..7dfab581bcc299114d3016d6f3402bc09b4f90ae 100644 (file)
@@ -230,8 +230,8 @@ void turret_construct(entity this)
        this.health                                             = 255;
        this.solid                                              = SOLID_BBOX;
        this.tur_head.solid                             = SOLID_NOT;
-       this.movetype                                   = MOVETYPE_NOCLIP;
-       this.tur_head.movetype                  = MOVETYPE_NOCLIP;
+       this.move_movetype                                      = MOVETYPE_NOCLIP;
+       this.tur_head.move_movetype                     = MOVETYPE_NOCLIP;
        this.draw                                               = turret_draw;
        this.entremove                                  = turret_remove;
        this.drawmask                                   = MASK_NORMAL;
index 1f8450f3951b07ed0595c523a7241777d6c26013..d26405da49f7e213f939e7b9b901848d1b72edaf 100644 (file)
@@ -32,7 +32,7 @@ vector turret_aim_generic(entity this)
 
                        if(this.aim_flags & TFL_AIM_ZPREDICT)
                        if(!IS_ONGROUND(this.enemy))
-                       if(this.enemy.movetype == MOVETYPE_WALK || this.enemy.movetype == MOVETYPE_TOSS || this.enemy.movetype == MOVETYPE_BOUNCE)
+                       if(this.enemy.move_movetype == MOVETYPE_WALK || this.enemy.move_movetype == MOVETYPE_TOSS || this.enemy.move_movetype == MOVETYPE_BOUNCE)
                        {
                                float vz;
                                prep_z = pre_pos_z;
@@ -474,7 +474,7 @@ entity turret_projectile(entity actor, Sound _snd, float _size, float _health, f
        setthink(proj, turret_projectile_explode);
        settouch(proj, turret_projectile_touch);
        proj.nextthink    = time + 9;
-       proj.movetype           = MOVETYPE_FLYMISSILE;
+       proj.move_movetype              = MOVETYPE_FLYMISSILE;
        proj.velocity           = normalize(actor.tur_shotdir_updated + randomvec() * actor.shot_spread) * actor.shot_speed;
        proj.flags                = FL_PROJECTILE;
        proj.enemy                = actor.enemy;
@@ -1329,7 +1329,7 @@ bool turret_initialize(entity this, Turret tur)
        this.ammo_recharge                 *= this.ticrate;
        this.solid                                      = SOLID_BBOX;
        this.takedamage                         = DAMAGE_AIM;
-       this.movetype                           = MOVETYPE_NOCLIP;
+       this.move_movetype                              = MOVETYPE_NOCLIP;
        this.view_ofs                           = '0 0 0';
        this.turret_firecheckfunc       = turret_firecheck;
        this.event_damage                       = turret_damage;
@@ -1349,7 +1349,7 @@ bool turret_initialize(entity this, Turret tur)
        this.tur_head.owner                     = this;
        this.tur_head.takedamage        = DAMAGE_NO;
        this.tur_head.solid                     = SOLID_NOT;
-       this.tur_head.movetype          = this.movetype;
+       this.tur_head.move_movetype             = this.move_movetype;
 
        if(!this.tur_defend)
        if(this.target != "")
index 25879f599358ce7c851f7a43bb73d5021afd7a28..be6e3fd01adaf5514dfdc60bdb3d0faf8580c9f3 100644 (file)
@@ -184,7 +184,7 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it))
 {
     entity e;
 
-    if(it.movetype == MOVETYPE_WALK)
+    if(it.move_movetype == MOVETYPE_WALK)
     {
         it.velocity = '0 0 0';
         it.enemy = NULL;
@@ -218,7 +218,7 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it))
     it.iscreature                              = true;
     it.teleportable                    = TELEPORT_NORMAL;
     it.damagedbycontents               = true;
-    it.movetype                                = MOVETYPE_WALK;
+    it.move_movetype                           = MOVETYPE_WALK;
     it.solid                                   = SOLID_SLIDEBOX;
     it.takedamage                              = DAMAGE_AIM;
     it.idle_aim                                = '0 0 0';
@@ -257,7 +257,7 @@ void ewheel_draw(entity this)
         METHOD(EWheel, tr_setup, void(EWheel this, entity it))
         {
             it.gravity         = 1;
-            it.movetype                = MOVETYPE_BOUNCE;
+            it.move_movetype           = MOVETYPE_BOUNCE;
             it.move_movetype   = MOVETYPE_BOUNCE;
             it.move_time               = time;
             it.draw                    = ewheel_draw;
index dc6f49cab35dcf3a4b5bfc49d1dbd1e83783206d..afc3ed17cba8d489d3edfeca9b7acfe8d1ff2a18 100644 (file)
@@ -31,7 +31,7 @@ METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity
 
         setthink(missile, turret_hk_missile_think);
         missile.nextthink = time + 0.25;
-        missile.movetype = MOVETYPE_BOUNCEMISSILE;
+        set_movetype(missile, MOVETYPE_BOUNCEMISSILE);
         missile.velocity = actor.tur_shotdir_updated * (actor.shot_speed * 0.75);
         missile.angles = vectoangles(missile.velocity);
         missile.cnt = time + 30;
@@ -207,7 +207,7 @@ void turret_hk_missile_think(entity this)
     {
         this.cnt = time + 0.25;
         this.nextthink = 0;
-        this.movetype           = MOVETYPE_BOUNCE;
+        this.move_movetype              = MOVETYPE_BOUNCE;
         return;
     }
 
index ea48a6479024734fd4a425f044c37548d40118e9..df68e1ce7feb7e3db811ef084a3798938ed6ab8f 100644 (file)
@@ -33,7 +33,7 @@ METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, entity actor, .entity
         beam.owner = actor;
         beam.shot_dmg = actor.shot_dmg / (actor.shot_speed / beam.ticrate);
         beam.scale = actor.target_range / 256;
-        beam.movetype = MOVETYPE_NONE;
+        set_movetype(beam, MOVETYPE_NONE);
         beam.enemy = actor.enemy;
         beam.bot_dodge = true;
         beam.bot_dodgerating = beam.shot_dmg;
index 46108e0b7c2d3f37a4853faf68c1819b8a431374..18af3d37d4c91c88333e783314899fa7ea208c65 100644 (file)
@@ -255,7 +255,7 @@ void walker_fire_rocket(entity this, vector org)
     rocket.event_damage           = walker_rocket_damage;
 
     rocket.nextthink             = time;
-    rocket.movetype               = MOVETYPE_FLY;
+    rocket.move_movetype                  = MOVETYPE_FLY;
     rocket.velocity               = normalize((v_forward + v_up * 0.5) + (randomvec() * 0.2)) * (autocvar_g_turrets_unit_walker_rocket_speed);
     rocket.angles                       = vectoangles(rocket.velocity);
     settouch(rocket, walker_rocket_touch);
@@ -571,7 +571,7 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
     entity e;
 
     // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
-    if(it.movetype == MOVETYPE_WALK)
+    if(it.move_movetype == MOVETYPE_WALK)
     {
         if(it.pos1)
             setorigin(it, it.pos1);
@@ -590,7 +590,7 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
     it.damagedbycontents = true;
     it.solid = SOLID_SLIDEBOX;
     it.takedamage = DAMAGE_AIM;
-    if(it.movetype != MOVETYPE_WALK)
+    if(it.move_movetype != MOVETYPE_WALK)
     {
         setorigin(it, it.origin);
         tracebox(it.origin + '0 0 128', it.mins, it.maxs, it.origin - '0 0 10000', MOVE_NORMAL, it);
@@ -598,7 +598,7 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
         it.pos1 = it.origin;
         it.pos2 = it.angles;
     }
-    it.movetype = MOVETYPE_WALK;
+    set_movetype(it, MOVETYPE_WALK);
     it.idle_aim = '0 0 0';
     it.turret_firecheckfunc = walker_firecheck;
 
index 4928262f2f4ef85c355e875c7a1c2097a1bdd58d..2c33c165a7fa3a2acf39e375a46c17f393969fe0 100644 (file)
@@ -115,7 +115,7 @@ void mark_error(vector where,float lifetime)
        entity err = new(error_marker);
        setmodel(err, MDL_MARKER);
        setorigin(err, where);
-       err.movetype = MOVETYPE_NONE;
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 0;
@@ -128,7 +128,7 @@ void mark_info(vector where,float lifetime)
        entity err = spawn(info_marker);
        setmodel(err, MDL_MARKER);
        setorigin(err, where);
-       err.movetype = MOVETYPE_NONE;
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 1;
@@ -141,7 +141,7 @@ entity mark_misc(vector where,float lifetime)
        entity err = spawn(mark_misc);
        setmodel(err, MDL_MARKER);
        setorigin(err, where);
-       err.movetype = MOVETYPE_NONE;
+       set_movetype(err, MOVETYPE_NONE);
        setthink(err, marker_think);
        err.nextthink = time;
        err.skin = 3;
@@ -167,7 +167,7 @@ void paint_target(entity onwho, float f_size, vector v_color, float f_time)
        //setattachment(e,onwho,"");
        setorigin(e, onwho.origin + '0 0 1');
        e.alpha = 0.15;
-       e.movetype = MOVETYPE_FLY;
+       set_movetype(e, MOVETYPE_FLY);
 
        e.velocity = (v_color * 32); // + '0 0 1' * 64;
 
@@ -186,7 +186,7 @@ void paint_target2(entity onwho, float f_size, vector v_color, float f_time)
 
        setorigin(e, onwho.origin + '0 0 1');
        e.alpha = 0.15;
-       e.movetype = MOVETYPE_FLY;
+       set_movetype(e, MOVETYPE_FLY);
 
        e.velocity = (v_color * 32); // + '0 0 1' * 64;
        e.avelocity_x = -128;
@@ -203,7 +203,7 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time)
        e.scale = (f_size/512);
        setsize(e, '0 0 0', '0 0 0');
        setorigin(e, where + '0 0 1');
-       e.movetype = MOVETYPE_NONE;
+       set_movetype(e, MOVETYPE_NONE);
        e.velocity = '0 0 0';
        e.colormod = v_color;
        SUB_SetFade(e,time,f_time);
index fc2a06241310e21b495049d51996fe901ef4dafa..e5736abd4a3bdbfd51332a2978b2ce1bd7df5aa4 100644 (file)
@@ -227,7 +227,7 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
        proj.shot_force    = _force;
        proj.totalfrags    = _deahtype;
        proj.solid                      = SOLID_BBOX;
-       proj.movetype            = MOVETYPE_FLYMISSILE;
+       proj.move_movetype               = MOVETYPE_FLYMISSILE;
        proj.flags                      = FL_PROJECTILE;
        proj.bot_dodge          = true;
        proj.bot_dodgerating  = _dmg;
@@ -290,7 +290,7 @@ entity vehicle_tossgib(entity this, entity _template, vector _vel, string _tag,
        vector org = gettaginfo(this, gettagindex(this, _tag));
        setorigin(_gib, org);
        _gib.velocity = _vel;
-       _gib.movetype = MOVETYPE_TOSS;
+       set_movetype(_gib, MOVETYPE_TOSS);
        _gib.solid = SOLID_CORPSE;
        _gib.colormod = '-0.5 -0.5 -0.5';
        _gib.effects = EF_LOWPRECISION;
@@ -777,7 +777,7 @@ void vehicles_exit(entity vehic, bool eject)
 
                player.takedamage               = DAMAGE_AIM;
                player.solid                    = SOLID_SLIDEBOX;
-               player.movetype         = MOVETYPE_WALK;
+               player.move_movetype            = MOVETYPE_WALK;
                player.effects             &= ~EF_NODRAW;
                player.teleportable     = TELEPORT_NORMAL;
                player.alpha                    = 1;
@@ -947,7 +947,7 @@ void vehicles_enter(entity pl, entity veh)
        pl.angles                       = veh.angles;
        pl.takedamage           = DAMAGE_NO;
        pl.solid                        = SOLID_NOT;
-       pl.movetype                     = MOVETYPE_NOCLIP;
+       pl.move_movetype                        = MOVETYPE_NOCLIP;
        pl.teleportable         = false;
        pl.alpha                        = -1;
        pl.event_damage         = func_null;
@@ -1051,7 +1051,7 @@ void vehicles_spawn(entity this)
        this.iscreature                 = true;
        this.teleportable               = false; // no teleporting for vehicles, too buggy
        this.damagedbycontents  = true;
-       this.movetype                   = MOVETYPE_WALK;
+       this.move_movetype                      = MOVETYPE_WALK;
        this.solid                              = SOLID_SLIDEBOX;
        this.takedamage                 = DAMAGE_AIM;
        this.deadflag                   = DEAD_NO;
index a0b196e1e302169522e97fdb48d5f8a3f61a297e..1842ebe7b405e7e45d86dea9207226bde805f051 100644 (file)
@@ -138,7 +138,7 @@ bool bumblebee_gunner_frame(entity this)
                        gun.enemy = NULL;
 
                if(trace_ent)
-                       if(trace_ent.movetype)
+                       if(trace_ent.move_movetype)
                                if(trace_ent.takedamage)
                                        if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
                                        {
@@ -156,7 +156,7 @@ bool bumblebee_gunner_frame(entity this)
 
                vector vf = real_origin(gun.enemy);
                vector _vel = gun.enemy.velocity;
-               if(gun.enemy.movetype == MOVETYPE_WALK)
+               if(gun.enemy.move_movetype == MOVETYPE_WALK)
                        _vel.z *= 0.1;
 
 
@@ -256,7 +256,7 @@ void bumblebee_gunner_exit(entity this, int _exitflag)
 
        player.takedamage     = DAMAGE_AIM;
        player.solid          = SOLID_SLIDEBOX;
-       player.movetype       = MOVETYPE_WALK;
+       player.move_movetype       = MOVETYPE_WALK;
        player.effects       &= ~EF_NODRAW;
        player.alpha          = 1;
        player.PlayerPhysplug = func_null;
@@ -319,7 +319,7 @@ bool bumblebee_gunner_enter(entity this, entity player)
        player.takedamage               = DAMAGE_NO;
        player.solid                    = SOLID_NOT;
        player.alpha                    = -1;
-       player.movetype                 = MOVETYPE_NOCLIP;
+       player.move_movetype            = MOVETYPE_NOCLIP;
        player.event_damage     = func_null;
        player.view_ofs                 = '0 0 0';
        player.hud                              = gunner.hud;
@@ -510,7 +510,7 @@ bool bumblebee_pilot_frame(entity this)
                        vehic.tur_head.enemy = NULL;
 
                if(trace_ent)
-               if(trace_ent.movetype)
+               if(trace_ent.move_movetype)
                if(trace_ent.takedamage)
                if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
                {
@@ -660,7 +660,7 @@ void bumblebee_exit(entity this, int eject)
                this.nextthink  = time;
        }
 
-       this.movetype = MOVETYPE_TOSS;
+       set_movetype(this, MOVETYPE_TOSS);
 
        if(!this.owner)
                return;
@@ -737,7 +737,7 @@ METHOD(Bumblebee, vr_enter, void(Bumblebee thisveh, entity instance))
 {
     settouch(instance, bumblebee_touch);
     instance.nextthink = 0;
-    instance.movetype = MOVETYPE_BOUNCEMISSILE;
+    set_movetype(instance, MOVETYPE_BOUNCEMISSILE);
 }
 METHOD(Bumblebee, vr_gunner_enter, void(Bumblebee thisveh, entity instance, entity actor))
 {
@@ -824,7 +824,7 @@ METHOD(Bumblebee, vr_death, void(Bumblebee thisveh, entity instance))
     instance.solid                     = SOLID_NOT;
     instance.takedamage                = DAMAGE_NO;
     instance.deadflag          = DEAD_DYING;
-    instance.movetype          = MOVETYPE_NONE;
+    instance.move_movetype             = MOVETYPE_NONE;
     instance.effects           = EF_NODRAW;
     instance.colormod          = '0 0 0';
     instance.avelocity         = '0 0 0';
@@ -904,7 +904,7 @@ METHOD(Bumblebee, vr_spawn, void(Bumblebee thisveh, entity instance))
     instance.vehicle_health = autocvar_g_vehicle_bumblebee_health;
     instance.vehicle_shield = autocvar_g_vehicle_bumblebee_shield;
     instance.solid = SOLID_BBOX;
-    instance.movetype = MOVETYPE_TOSS;
+    set_movetype(instance, MOVETYPE_TOSS);
     instance.damageforcescale = 0.025;
 
     instance.PlayerPhysplug = bumblebee_pilot_frame;
index cee5a6a0e55bc96b0b63d248cfd2f1e8a27f4c08..e216a740c5dbb26b090824437ebfa31fae59b6c3 100644 (file)
@@ -439,7 +439,7 @@ void racer_exit(entity this, int eject)
 
        setthink(this, racer_think);
        this.nextthink  = time;
-       this.movetype   = MOVETYPE_BOUNCE;
+       this.move_movetype   = MOVETYPE_BOUNCE;
        sound (this.tur_head, CH_TRIGGER_SINGLE, SND_Null, VOL_VEHICLEENGINE, ATTEN_NORM);
 
        if(!this.owner)
@@ -490,7 +490,7 @@ void racer_blowup(entity this)
 
        this.nextthink  = time + autocvar_g_vehicle_racer_respawntime;
        setthink(this, vehicles_spawn);
-       this.movetype   = MOVETYPE_NONE;
+       this.move_movetype   = MOVETYPE_NONE;
        this.effects    = EF_NODRAW;
        this.solid = SOLID_NOT;
 
@@ -538,7 +538,7 @@ METHOD(Racer, vr_impact, void(Racer thisveh, entity instance))
 METHOD(Racer, vr_enter, void(Racer thisveh, entity instance))
 {
 #ifdef SVQC
-    instance.movetype = MOVETYPE_BOUNCE;
+    set_movetype(instance, MOVETYPE_BOUNCE);
     instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_racer_health)  * 100;
     instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_racer_shield)  * 100;
 
@@ -572,7 +572,7 @@ METHOD(Racer, vr_spawn, void(Racer thisveh, entity instance))
     instance.vehicle_health = autocvar_g_vehicle_racer_health;
     instance.vehicle_shield = autocvar_g_vehicle_racer_shield;
 
-    instance.movetype    = MOVETYPE_TOSS;
+    instance.move_movetype       = MOVETYPE_TOSS;
     instance.solid               = SOLID_SLIDEBOX;
     instance.delay               = time;
     instance.scale               = 0.5;
@@ -596,7 +596,7 @@ METHOD(Racer, vr_death, void(Racer thisveh, entity instance))
     instance.solid                     = SOLID_CORPSE;
     instance.takedamage                = DAMAGE_NO;
     instance.deadflag          = DEAD_DYING;
-    instance.movetype          = MOVETYPE_BOUNCE;
+    instance.move_movetype             = MOVETYPE_BOUNCE;
     instance.wait                      = time;
     instance.delay                     = 2 + time + random() * 3;
     instance.cnt                       = 1 + random() * 2;
index 562f522f3e111bdcbc368731f7c1e722ae5e9d58..8e286694687a1cf9325e19d31f8f346fb6d054fe 100644 (file)
@@ -96,7 +96,7 @@ void raptor_land(entity this)
 
        if(hgt < 16)
        {
-               this.movetype = MOVETYPE_TOSS;
+               set_movetype(this, MOVETYPE_TOSS);
                setthink(this, vehicles_think);
                this.frame      = 0;
        }
@@ -287,7 +287,7 @@ bool raptor_frame(entity this)
                        vehic.gun1.enemy = NULL;
 
                if(trace_ent)
-               if(trace_ent.movetype)
+               if(trace_ent.move_movetype)
                if(trace_ent.takedamage)
                if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
                {
@@ -313,7 +313,7 @@ bool raptor_frame(entity this)
                        vf = real_origin(vehic.gun1.enemy);
                        UpdateAuxiliaryXhair(this, vf, '1 0 0', 1);
                        vector _vel = vehic.gun1.enemy.velocity;
-                       if(vehic.gun1.enemy.movetype == MOVETYPE_WALK)
+                       if(vehic.gun1.enemy.move_movetype == MOVETYPE_WALK)
                                _vel_z *= 0.1;
 
                        if(autocvar_g_vehicle_raptor_cannon_predicttarget)
@@ -517,7 +517,7 @@ void raptor_blowup(entity this, entity toucher)
        RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_RAPT_DEATH.m_id, NULL);
 
        this.alpha                = -1;
-       this.movetype      = MOVETYPE_NONE;
+       this.move_movetype         = MOVETYPE_NONE;
        this.effects            = EF_NODRAW;
        this.colormod      = '0 0 0';
        this.avelocity    = '0 0 0';
@@ -613,7 +613,7 @@ METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
 {
     instance.vehicle_weapon2mode = RSM_BOMB;
     instance.owner.PlayerPhysplug = raptor_takeoff;
-    instance.movetype     = MOVETYPE_BOUNCEMISSILE;
+    instance.move_movetype        = MOVETYPE_BOUNCEMISSILE;
     instance.solid               = SOLID_SLIDEBOX;
     instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_raptor_health) * 100;
     instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_raptor_shield) * 100;
@@ -635,7 +635,7 @@ METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
     instance.solid                             = SOLID_CORPSE;
     instance.takedamage                        = DAMAGE_NO;
     instance.deadflag                  = DEAD_DYING;
-    instance.movetype                  = MOVETYPE_BOUNCE;
+    instance.move_movetype                     = MOVETYPE_BOUNCE;
     setthink(instance, raptor_diethink);
     instance.nextthink                 = time;
     instance.wait                              = time + 5 + (random() * 5);
@@ -702,7 +702,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
         spinner.owner = instance;
         setmodel(spinner, MDL_VEH_RAPTOR_PROP);
         setattachment(spinner, instance, "engine_left");
-        spinner.movetype = MOVETYPE_NOCLIP;
+        set_movetype(spinner, MOVETYPE_NOCLIP);
         spinner.avelocity = '0 90 0';
         instance.bomb1.gun1 = spinner;
 
@@ -710,7 +710,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
         spinner.owner = instance;
         setmodel(spinner, MDL_VEH_RAPTOR_PROP);
         setattachment(spinner, instance, "engine_right");
-        spinner.movetype = MOVETYPE_NOCLIP;
+        set_movetype(spinner, MOVETYPE_NOCLIP);
         spinner.avelocity = '0 -90 0';
         instance.bomb1.gun2 = spinner;
 
@@ -724,7 +724,7 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
     instance.frame               = 0;
     instance.vehicle_health = autocvar_g_vehicle_raptor_health;
     instance.vehicle_shield = autocvar_g_vehicle_raptor_shield;
-    instance.movetype     = MOVETYPE_TOSS;
+    instance.move_movetype        = MOVETYPE_TOSS;
     instance.solid               = SOLID_SLIDEBOX;
     instance.vehicle_energy = 1;
 
index f1357f306c49e389bd43c070101c55182c2c7759..94fb9eaa580420924d70ffe7df678d4d24e2dddc 100644 (file)
@@ -67,7 +67,7 @@ METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weapone
             _flare.effects = EF_LOWPRECISION | EF_FLAME;
             _flare.scale = 0.5;
             setorigin(_flare, actor.origin - '0 0 16');
-            _flare.movetype = MOVETYPE_TOSS;
+            set_movetype(_flare, MOVETYPE_TOSS);
             _flare.gravity = 0.15;
             _flare.velocity = 0.25 * actor.velocity + (v_forward + randomvec() * 0.25)* -500;
             setthink(_flare, raptor_flare_think);
@@ -128,7 +128,7 @@ void raptor_bomb_burst(entity this)
         bomblet = spawn();
         setorigin(bomblet, this.origin);
 
-        bomblet.movetype       = MOVETYPE_TOSS;
+        bomblet.move_movetype  = MOVETYPE_TOSS;
         settouch(bomblet, raptor_bomblet_touch);
         setthink(bomblet, raptor_bomblet_boom);
         bomblet.nextthink   = time + 5;
@@ -160,7 +160,7 @@ void raptor_bombdrop(entity this)
     org = gettaginfo(this, gettagindex(this, "bombmount_right"));
     setorigin(bomb_2, org);
 
-    bomb_1.movetype     = bomb_2.movetype   = MOVETYPE_BOUNCE;
+    bomb_1.move_movetype        = bomb_2.move_movetype   = MOVETYPE_BOUNCE;
     bomb_1.velocity     = bomb_2.velocity   = this.velocity;
     settouch(bomb_1, raptor_bomb_touch);
     settouch(bomb_2, raptor_bomb_touch);
@@ -240,7 +240,7 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
     setmodel(sfrag, MDL_VEH_RAPTOR_CB_FRAGMENT);
     setorigin(sfrag, _org);
 
-    sfrag.move_movetype = MOVETYPE_BOUNCE;
+    set_movetype(sfrag, MOVETYPE_BOUNCE);
     sfrag.gravity = 0.15;
     sfrag.solid = SOLID_CORPSE;
 
index 8015b3102729534d836ce32fc4d111e59f6ea8c1..8140de8646d6b85b366c1b277029ada2ff4f7d36 100644 (file)
@@ -349,7 +349,7 @@ void spiderbot_exit(entity this, int eject)
        setthink(this, vehicles_think);
        this.nextthink = time;
        this.frame = 5;
-       this.movetype = MOVETYPE_WALK;
+       set_movetype(this, MOVETYPE_WALK);
 
        if(!this.owner)
                return;
@@ -435,7 +435,7 @@ void spiderbot_blowup(entity this)
 
        vector org = gettaginfo(this, gettagindex(this, "tag_head"));
        setorigin(h, org);
-       h.movetype = MOVETYPE_BOUNCE;
+       set_movetype(h, MOVETYPE_BOUNCE);
        h.solid = SOLID_BBOX;
        h.velocity = v_up * (500 + random() * 500) + randomvec() * 128;
        h.modelflags = MF_ROCKET;
@@ -451,14 +451,14 @@ void spiderbot_blowup(entity this)
 
        org = gettaginfo(this.tur_head, gettagindex(this.tur_head, "tag_hardpoint01"));
        setorigin(g1, org);
-       g1.movetype = MOVETYPE_TOSS;
+       set_movetype(g1, MOVETYPE_TOSS);
        g1.solid = SOLID_CORPSE;
        g1.velocity = v_forward * 700 + (randomvec() * 32);
        g1.avelocity = randomvec() * 180;
 
        org = gettaginfo(this.tur_head, gettagindex(this.tur_head, "tag_hardpoint02"));
        setorigin(g2, org);
-       g2.movetype = MOVETYPE_TOSS;
+       set_movetype(g2, MOVETYPE_TOSS);
        g2.solid = SOLID_CORPSE;
        g2.velocity = v_forward * 700 + (randomvec() * 32);
        g2.avelocity = randomvec() * 180;
@@ -473,7 +473,7 @@ void spiderbot_blowup(entity this)
        RadiusDamage (this, this.enemy, 250, 15, 250, NULL, NULL, 250, DEATH_VH_SPID_DEATH.m_id, NULL);
 
        this.alpha = this.tur_head.alpha = this.gun1.alpha = this.gun2.alpha = -1;
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.deadflag = DEAD_DEAD;
        this.solid = SOLID_NOT;
        this.tur_head.effects &= ~EF_FLAME;
@@ -543,7 +543,7 @@ METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh, entity instance))
 METHOD(Spiderbot, vr_enter, void(Spiderbot thisveh, entity instance))
 {
     instance.vehicle_weapon2mode = SBRM_GUIDE;
-    instance.movetype = MOVETYPE_WALK;
+    set_movetype(instance, MOVETYPE_WALK);
     CSQCVehicleSetup(instance.owner, 0);
     instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_spiderbot_health) * 100;
     instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_spiderbot_shield) * 100;
@@ -573,7 +573,7 @@ METHOD(Spiderbot, vr_death, void(Spiderbot thisveh, entity instance))
     instance.tur_head.effects  |= EF_FLAME;
     instance.colormod                  = instance.tur_head.colormod = '-1 -1 -1';
     instance.frame                             = 10;
-    instance.movetype                  = MOVETYPE_TOSS;
+    set_movetype(instance, MOVETYPE_TOSS);
 
     CSQCModel_UnlinkEntity(instance); // networking the death scene would be a nightmare
 }
@@ -594,7 +594,7 @@ METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh, entity instance))
 
     instance.frame = 5;
     instance.tur_head.frame = 1;
-    instance.movetype = MOVETYPE_WALK;
+    set_movetype(instance, MOVETYPE_WALK);
     instance.solid = SOLID_SLIDEBOX;
     instance.alpha = instance.tur_head.alpha = instance.gun1.alpha = instance.gun2.alpha = 1;
     instance.tur_head.angles = '0 0 0';
index 8876f89594cc80aab5d2f0fcda15691e502fbb83..c81a88b742e3f025e8a8784f3ecd400b1edf4580 100644 (file)
@@ -232,7 +232,7 @@ void spiderbot_rocket_do(entity this)
             float h2 = 0.75 * vlen(rocket.pos1 - v);
 
             rocket.velocity  = spiberbot_calcartillery(v, rocket.pos1, ((h1 < h2) ? h1 : h2));
-            rocket.movetype  = MOVETYPE_TOSS;
+            rocket.move_movetype  = MOVETYPE_TOSS;
             rocket.gravity   = 1;
             //setthink(rocket, spiderbot_rocket_artillery);
         break;
index 012b2c0f1417fe432814dea9f816f7a50e78f315..b07a3d98c84876fd68e79a849a9ce9c4500ed941 100644 (file)
@@ -295,7 +295,7 @@ void W_Arc_Attack_Bolt(Weapon thiswep, entity actor)
        setorigin(missile, w_shotorg);
        setsize(missile, '0 0 0', '0 0 0');
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        W_SetupProjVelocity_PRE(missile, arc, bolt_);
 
        missile.angles = vectoangles(missile.velocity);
@@ -685,7 +685,7 @@ void W_Arc_Beam(float burst, entity actor)
        beam.solid = SOLID_NOT;
        setthink(beam, W_Arc_Beam_Think);
        beam.owner = actor;
-       beam.movetype = MOVETYPE_NONE;
+       set_movetype(beam, MOVETYPE_NONE);
        beam.bot_dodge = true;
        beam.bot_dodgerating = WEP_CVAR(arc, beam_damage);
        beam.beam_bursting = burst;
index 79a680e367eb27825d3d3a9befabbc99824c4edb..3a9bf365da35186132ee44561cdf13e6e39b2322 100644 (file)
@@ -80,7 +80,7 @@ void W_Blaster_Touch(entity this, entity toucher)
 
 void W_Blaster_Think(entity this)
 {
-       this.movetype = MOVETYPE_FLY;
+       set_movetype(this, MOVETYPE_FLY);
        setthink(this, SUB_Remove);
        this.nextthink = time + this.blaster_lifetime;
        CSQCProjectile(this, true, PROJECTILE_BLASTER, true);
index d1f2522abbcccecde8fe3263b8cd1857d06a2162..47fa8efcadaec3d884717b8f0bf710436656a5b8 100644 (file)
@@ -395,7 +395,7 @@ void W_Crylink_Attack(Weapon thiswep, entity actor)
 
                prevproj = proj;
 
-               proj.movetype = MOVETYPE_BOUNCEMISSILE;
+               set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
                proj.projectiledeathtype = WEP_CRYLINK.m_id;
                //proj.gravity = 0.001;
@@ -503,7 +503,7 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor)
 
                prevproj = proj;
 
-               proj.movetype = MOVETYPE_BOUNCEMISSILE;
+               set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
                proj.projectiledeathtype = WEP_CRYLINK.m_id | HITTYPE_SECONDARY;
                //proj.gravity = 0.001;
index 9d955f058dd3a59ecd9fdc0dd7a54548ea4b38ba..bcc81c82e981eeea588da0f631c672f8617ef981 100644 (file)
@@ -376,7 +376,7 @@ void W_Devastator_Attack(Weapon thiswep, entity actor)
        missile.event_damage = W_Devastator_Damage;
        missile.damagedbycontents = true;
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
        missile.projectiledeathtype = WEP_DEVASTATOR.m_id;
        setsize(missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
index b9811abd87d37f7a37ac86ae98513f64360c6f98..a1d6eb39a7a5af43cea4cc42fbabdfee928e9286 100644 (file)
@@ -156,7 +156,7 @@ void W_Electro_Explode(entity this, entity directhitentity)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       if(this.movetype == MOVETYPE_BOUNCE)
+       if(this.move_movetype == MOVETYPE_BOUNCE)
        {
                RadiusDamage(
                        this,
@@ -285,7 +285,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor)
        proj.projectiledeathtype = WEP_ELECTRO.m_id;
        setorigin(proj, w_shotorg);
 
-       proj.movetype = MOVETYPE_FLY;
+       set_movetype(proj, MOVETYPE_FLY);
        W_SetupProjVelocity_PRI(proj, electro);
        proj.angles = vectoangles(proj.velocity);
        settouch(proj, W_Electro_TouchExplode);
@@ -385,7 +385,7 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor)
 
        //proj.glow_size = 50;
        //proj.glow_color = 45;
-       proj.movetype = MOVETYPE_BOUNCE;
+       set_movetype(proj, MOVETYPE_BOUNCE);
        W_SetupProjVelocity_UP_SEC(proj, electro);
        settouch(proj, W_Electro_Orb_Touch);
        setsize(proj, '0 0 -4', '0 0 -4');
index 37deb1452819a9238690130656b0c9dea9b7a989..69c2dc006f5d5c3eabe3e57b0c0b8c7e86263bdd 100644 (file)
@@ -218,7 +218,7 @@ void W_Fireball_Attack1(entity actor)
        proj.projectiledeathtype = WEP_FIREBALL.m_id;
        setorigin(proj, w_shotorg);
 
-       proj.movetype = MOVETYPE_FLY;
+       set_movetype(proj, MOVETYPE_FLY);
        W_SetupProjVelocity_PRI(proj, fireball);
        proj.angles = vectoangles(proj.velocity);
        settouch(proj, W_Fireball_TouchExplode);
@@ -340,7 +340,7 @@ void W_Fireball_Attack2(entity actor)
        proj.owner = proj.realowner = actor;
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_SEC(fireball, damage);
-       proj.movetype = MOVETYPE_BOUNCE;
+       set_movetype(proj, MOVETYPE_BOUNCE);
        proj.projectiledeathtype = WEP_FIREBALL.m_id | HITTYPE_SECONDARY;
        settouch(proj, W_Fireball_Firemine_Touch);
        PROJECTILE_MAKETRIGGER(proj);
index 1a078dff0a4d0e9f56515fea34fe3f61ab7b39eb..130c470636facc264f4b9759d187d87a52df3ecc 100644 (file)
@@ -164,7 +164,7 @@ void W_Hagar_Attack(Weapon thiswep, entity actor)
        setorigin(missile, w_shotorg);
        setsize(missile, '0 0 0', '0 0 0');
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        W_SetupProjVelocity_PRI(missile, hagar);
 
        missile.angles = vectoangles(missile.velocity);
@@ -207,7 +207,7 @@ void W_Hagar_Attack2(Weapon thiswep, entity actor)
        setorigin(missile, w_shotorg);
        setsize(missile, '0 0 0', '0 0 0');
 
-       missile.movetype = MOVETYPE_BOUNCEMISSILE;
+       set_movetype(missile, MOVETYPE_BOUNCEMISSILE);
        W_SetupProjVelocity_SEC(missile, hagar);
 
        missile.angles = vectoangles(missile.velocity);
@@ -264,7 +264,7 @@ void W_Hagar_Attack2_Load_Release(entity actor, .entity weaponentity)
                missile.projectiledeathtype = WEP_HAGAR.m_id | HITTYPE_SECONDARY;
                setorigin(missile, w_shotorg);
                setsize(missile, '0 0 0', '0 0 0');
-               missile.movetype = MOVETYPE_FLY;
+               set_movetype(missile, MOVETYPE_FLY);
                missile.missile_flags = MIF_SPLASH;
 
                // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar)
index d46972fa1c95066093482159349b2fc913aba0dd..ab4e2f7a0803780bb57960396ca058a4944a0a94 100644 (file)
@@ -95,7 +95,7 @@ void W_HLAC_Attack(Weapon thiswep, entity actor)
 
     missile.bot_dodgerating = WEP_CVAR_PRI(hlac, damage);
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
 
        setorigin(missile, w_shotorg);
@@ -137,7 +137,7 @@ void W_HLAC_Attack2(entity actor)
 
     missile.bot_dodgerating = WEP_CVAR_SEC(hlac, damage);
 
-       missile.movetype = MOVETYPE_FLY;
+       set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
 
        setorigin(missile, w_shotorg);
index f46e592e293b3f283e3d5140b34a3574a5afcc63..8926ffa306ea0bd5bbfbe68438deed9481b460f4 100644 (file)
@@ -115,7 +115,7 @@ void W_Hook_Explode2(entity this)
        this.dmg_duration = WEP_CVAR_SEC(hook, duration);
        this.teleport_time = time;
        this.dmg_last = 1;
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
 }
 
 void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
@@ -152,7 +152,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
        gren.owner = gren.realowner = actor;
        gren.bot_dodge = true;
        gren.bot_dodgerating = WEP_CVAR_SEC(hook, damage);
-       gren.movetype = MOVETYPE_TOSS;
+       set_movetype(gren, MOVETYPE_TOSS);
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
        setorigin(gren, w_shotorg);
index 08b3634f41306cad37e10cf2cf67a0b3c2692c28..ffa9793e80d15317eae7d355d20ec86dfcf70957 100644 (file)
@@ -91,7 +91,7 @@ void W_MineLayer_Stick(entity this, entity to)
        newmine.spawnshieldtime = this.spawnshieldtime;
        newmine.damagedbycontents = true;
 
-       newmine.movetype = MOVETYPE_NONE; // lock the mine in place
+       set_movetype(newmine, MOVETYPE_NONE); // lock the mine in place
        newmine.projectiledeathtype = this.projectiledeathtype;
 
        newmine.mine_time = this.mine_time;
@@ -148,7 +148,7 @@ void W_MineLayer_DoRemoteExplode(entity this)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       if(this.movetype == MOVETYPE_NONE || this.movetype == MOVETYPE_FOLLOW)
+       if(this.move_movetype == MOVETYPE_NONE || this.move_movetype == MOVETYPE_FOLLOW)
                this.velocity = this.mine_orientation; // particle fx and decals need .velocity
 
        RadiusDamage(this, this.realowner, WEP_CVAR(minelayer, remote_damage), WEP_CVAR(minelayer, remote_edgedamage), WEP_CVAR(minelayer, remote_radius), NULL, NULL, WEP_CVAR(minelayer, remote_force), this.projectiledeathtype | HITTYPE_BOUNCE, NULL);
@@ -216,12 +216,12 @@ void W_MineLayer_Think(entity this)
 
        this.nextthink = time;
 
-       if(this.movetype == MOVETYPE_FOLLOW)
+       if(this.move_movetype == MOVETYPE_FOLLOW)
        {
                if(LostMovetypeFollow(this))
                {
                        UnsetMovetypeFollow(this);
-                       this.movetype = MOVETYPE_NONE;
+                       set_movetype(this, MOVETYPE_NONE);
                }
        }
 
@@ -274,7 +274,7 @@ void W_MineLayer_Think(entity this)
 
 void W_MineLayer_Touch(entity this, entity toucher)
 {
-       if(this.movetype == MOVETYPE_NONE || this.movetype == MOVETYPE_FOLLOW)
+       if(this.move_movetype == MOVETYPE_NONE || this.move_movetype == MOVETYPE_FOLLOW)
                return; // we're already a stuck mine, why do we get called? TODO does this even happen?
 
        if(WarpZone_Projectile_Touch(this, toucher))
@@ -350,7 +350,7 @@ void W_MineLayer_Attack(Weapon thiswep, entity actor)
        mine.event_damage = W_MineLayer_Damage;
        mine.damagedbycontents = true;
 
-       mine.movetype = MOVETYPE_TOSS;
+       set_movetype(mine, MOVETYPE_TOSS);
        PROJECTILE_MAKETRIGGER(mine);
        mine.projectiledeathtype = WEP_MINE_LAYER.m_id;
        setsize(mine, '-4 -4 -4', '4 4 4'); // give it some size so it can be shot
index 8cbe75e74b060a35721d93b453fb1af9ae3390f3..748c2347f71ebda4805493d839f17612f1892802 100644 (file)
@@ -76,7 +76,7 @@ void W_Mortar_Grenade_Explode(entity this, entity directhitentity)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       if(this.movetype == MOVETYPE_NONE)
+       if(this.move_movetype == MOVETYPE_NONE)
                this.velocity = this.oldvelocity;
 
        RadiusDamage(this, this.realowner, WEP_CVAR_PRI(mortar, damage), WEP_CVAR_PRI(mortar, edgedamage), WEP_CVAR_PRI(mortar, radius), NULL, NULL, WEP_CVAR_PRI(mortar, force), this.projectiledeathtype, directhitentity);
@@ -101,7 +101,7 @@ void W_Mortar_Grenade_Explode2(entity this, entity directhitentity)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       if(this.movetype == MOVETYPE_NONE)
+       if(this.move_movetype == MOVETYPE_NONE)
                this.velocity = this.oldvelocity;
 
        RadiusDamage(this, this.realowner, WEP_CVAR_SEC(mortar, damage), WEP_CVAR_SEC(mortar, edgedamage), WEP_CVAR_SEC(mortar, radius), NULL, NULL, WEP_CVAR_SEC(mortar, force), this.projectiledeathtype, directhitentity);
@@ -155,14 +155,14 @@ void W_Mortar_Grenade_Touch1(entity this, entity toucher)
                this.projectiledeathtype |= HITTYPE_BOUNCE;
                this.gl_bouncecnt += 1;
        }
-       else if(WEP_CVAR_PRI(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.movetype == MOVETYPE_NONE))) // stick
+       else if(WEP_CVAR_PRI(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
        {
                spamsound(this, CH_SHOTS, SND(GRENADE_STICK), VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                this.oldvelocity = this.velocity;
                this.velocity = '0 0 0';
-               this.movetype = MOVETYPE_NONE; // also disables gravity
+               set_movetype(this, MOVETYPE_NONE); // also disables gravity
                this.gravity = 0; // nope, it does NOT! maybe a bug in CSQC code? TODO
                UpdateCSQCProjectile(this);
 
@@ -191,14 +191,14 @@ void W_Mortar_Grenade_Touch2(entity this, entity toucher)
                        this.nextthink = time + WEP_CVAR_SEC(mortar, lifetime_bounce);
 
        }
-       else if(WEP_CVAR_SEC(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.movetype == MOVETYPE_NONE))) // stick
+       else if(WEP_CVAR_SEC(mortar, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
        {
                spamsound(this, CH_SHOTS, SND(GRENADE_STICK), VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                this.oldvelocity = this.velocity;
                this.velocity = '0 0 0';
-               this.movetype = MOVETYPE_NONE; // also disables gravity
+               set_movetype(this, MOVETYPE_NONE); // also disables gravity
                this.gravity = 0; // nope, it does NOT! maybe a bug in CSQC code? TODO
                UpdateCSQCProjectile(this);
 
@@ -224,7 +224,7 @@ void W_Mortar_Attack(Weapon thiswep, entity actor)
        gren.owner = gren.realowner = actor;
        gren.bot_dodge = true;
        gren.bot_dodgerating = WEP_CVAR_PRI(mortar, damage);
-       gren.movetype = MOVETYPE_BOUNCE;
+       set_movetype(gren, MOVETYPE_BOUNCE);
        gren.bouncefactor = WEP_CVAR(mortar, bouncefactor);
        gren.bouncestop = WEP_CVAR(mortar, bouncestop);
        PROJECTILE_MAKETRIGGER(gren);
@@ -272,7 +272,7 @@ void W_Mortar_Attack2(Weapon thiswep, entity actor)
        gren.owner = gren.realowner = actor;
        gren.bot_dodge = true;
        gren.bot_dodgerating = WEP_CVAR_SEC(mortar, damage);
-       gren.movetype = MOVETYPE_BOUNCE;
+       set_movetype(gren, MOVETYPE_BOUNCE);
        gren.bouncefactor = WEP_CVAR(mortar, bouncefactor);
        gren.bouncestop = WEP_CVAR(mortar, bouncestop);
        PROJECTILE_MAKETRIGGER(gren);
index dbcad2c1e6d8e177666ebfb0b40e9141ba2f13a9..f17a2ac505f178514b6ee04b433bb9948441b477 100644 (file)
@@ -257,7 +257,7 @@ void W_Porto_Attack(entity actor, float type)
        gren.playerid = actor.playerid;
        gren.bot_dodge = true;
        gren.bot_dodgerating = 200;
-       gren.movetype = MOVETYPE_BOUNCEMISSILE;
+       set_movetype(gren, MOVETYPE_BOUNCEMISSILE);
        PROJECTILE_MAKETRIGGER(gren);
        gren.effects = EF_RED;
        gren.scale = 4;
index 524c6791f922b912bae8e0e788baa32ffdb927fa..7ef0367db418449eabc27a31bccb1999f929842c 100644 (file)
@@ -244,9 +244,9 @@ void W_Seeker_Missile_Animate(entity this)
                this.nextthink       = time;// + cvar("g_balance_seeker_missile_activate_delay"); // cant dealy with csqc projectiles
 
                if(autocvar_g_balance_seeker_missile_proxy)
-                       this.movetype    = MOVETYPE_BOUNCEMISSILE;
+                       this.move_movetype    = MOVETYPE_BOUNCEMISSILE;
                else
-                       this.movetype    = MOVETYPE_FLYMISSILE;
+                       this.move_movetype    = MOVETYPE_FLYMISSILE;
        }
 
        UpdateCSQCProjectile(this);
@@ -293,7 +293,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, vector f_diff, entity m
 
        setorigin(missile, w_shotorg);
        setsize(missile, '-4 -4 -4', '4 4 4');
-       missile.movetype    = MOVETYPE_FLYMISSILE;
+       missile.move_movetype    = MOVETYPE_FLYMISSILE;
        missile.flags       = FL_PROJECTILE;
        missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
 
@@ -367,7 +367,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor)
        setthink(missile, adaptor_think2use_hittype_splash);
        missile.nextthink               = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
        missile.solid                   = SOLID_BBOX;
-       missile.movetype                = MOVETYPE_FLY;
+       missile.move_movetype           = MOVETYPE_FLY;
        missile.projectiledeathtype = WEP_SEEKER.m_id;
        missile.projectiledeathtype = WEP_SEEKER.m_id | HITTYPE_SECONDARY;
        missile.flags                           = FL_PROJECTILE;
@@ -578,7 +578,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor)
        settouch(missile, W_Seeker_Tag_Touch);
        setthink(missile, SUB_Remove);
        missile.nextthink       = time + WEP_CVAR(seeker, tag_lifetime);
-       missile.movetype        = MOVETYPE_FLY;
+       missile.move_movetype        = MOVETYPE_FLY;
        missile.solid           = SOLID_BBOX;
 
        missile.takedamage       = DAMAGE_YES;
@@ -592,7 +592,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor)
        missile.flags       = FL_PROJECTILE;
        //missile.missile_flags = MIF_..?;
 
-       missile.movetype    = MOVETYPE_FLY;
+       missile.move_movetype    = MOVETYPE_FLY;
        W_SetupProjVelocity_PRE(missile, seeker, tag_);
        missile.angles = vectoangles(missile.velocity);
 
index 8a2fbdac3c30205abe3fed8ae1e0101d311dad62..362209f919698e6cb8070fa25f95db208a178af4 100644 (file)
@@ -277,7 +277,7 @@ void W_RocketMinsta_Attack2(entity actor)
 
         //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
 
-        proj.movetype = MOVETYPE_BOUNCEMISSILE;
+        set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
         //W_SETUPPROJECTILEVELOCITY(proj, g_balance_minstanex_laser);
                proj.velocity = (w_shotdir + (((counter + 0.5) / total) * 2 - 1) * v_right * (spread * (rndspread ? random() : 1))) * cvar("g_rm_laser_speed");
                proj.velocity_z = proj.velocity_z + cvar("g_rm_laser_zspread") * (random() - 0.5);
@@ -329,7 +329,7 @@ void W_RocketMinsta_Attack3 (entity actor)
 
         //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
 
-        proj.movetype = MOVETYPE_BOUNCEMISSILE;
+        set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                proj.velocity = w_shotdir * autocvar_g_rm_laser_speed;
                proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
         proj.angles = vectoangles(proj.velocity);
index 4390df8096e49b7aa08d471971920562ec450106..0b83f05bfa7d7436fc2664d04a39c76a2ee56659 100644 (file)
@@ -175,7 +175,7 @@ void WarpZone_Touch(entity this, entity toucher)
                return;
 
        // FIXME needs a better check to know what is safe to teleport and what not
-       if((toucher.movetype == MOVETYPE_NONE && toucher.move_movetype == MOVETYPE_NONE) || toucher.movetype == MOVETYPE_FOLLOW || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity
+       if((toucher.move_movetype == MOVETYPE_NONE && toucher.move_movetype == MOVETYPE_NONE) || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity
 #ifdef CSQC
        || tag_networkentity
 #endif
index 73f09c0e07e871c65c738e887547ec95e8e46d31..d5533647f51e7727cb19b886e9fd3eea6887bb8c 100644 (file)
@@ -43,7 +43,7 @@ void WarpZoneLib_ExactTrigger_Init(entity this)
                setsize(this, this.mins * this.scale, this.maxs * this.scale);
        else
                setsize(this, this.mins, this.maxs);
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.solid = SOLID_TRIGGER;
        this.model = "";
 }
index b2fca55e8671a76f7e31acfe71a666adb8ab9447..b867b5f6d13776dca6e9659054647240424558e8 100644 (file)
@@ -43,7 +43,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f
        if (!tracetossfaketarget)
                tracetossfaketarget = new(tracetossfaketarget);
        tracetossfaketarget.solid = savesolid;
-       tracetossfaketarget.movetype = targ.movetype;
+       set_movetype(tracetossfaketarget, targ.move_movetype);
        _setmodel(tracetossfaketarget, targ.model); // no low precision
        tracetossfaketarget.model = targ.model;
        tracetossfaketarget.modelindex = targ.modelindex;
@@ -63,7 +63,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f
 
                        // make it disappear
                        tracetossfaketarget.solid = SOLID_NOT;
-                       tracetossfaketarget.movetype = MOVETYPE_NONE;
+                       set_movetype(tracetossfaketarget, MOVETYPE_NONE);
                        tracetossfaketarget.model = "";
                        tracetossfaketarget.modelindex = 0;
                        // relink to remove it from physics considerations
@@ -78,7 +78,7 @@ float findtrajectorywithleading(vector org, vector m1, vector m2, entity targ, f
 
        // make it disappear
        tracetossfaketarget.solid = SOLID_NOT;
-       tracetossfaketarget.movetype = MOVETYPE_NONE;
+       set_movetype(tracetossfaketarget, MOVETYPE_NONE);
        tracetossfaketarget.model = "";
        tracetossfaketarget.modelindex = 0;
        // relink to remove it from physics considerations
index a7cbeae2856f37e6ffd7913524810e58c94e76f1..86f46b067f28679d19958c57feac658144e364dc 100644 (file)
@@ -232,7 +232,7 @@ float CheatImpulse(entity this, int imp)
                        break;
                case CHIMPULSE_TELEPORT.impulse:
                        IS_CHEAT(this, imp, 0, 0);
-                       if(this.movetype == MOVETYPE_NOCLIP)
+                       if(this.move_movetype == MOVETYPE_NOCLIP)
                        {
                                e = find(NULL, classname, "info_autoscreenshot");
                                if(e)
@@ -639,29 +639,29 @@ float CheatCommand(entity this, int argc)
                        break;
                case "noclip":
                        IS_CHEAT(this, 0, argc, 0);
-                       if(this.movetype != MOVETYPE_NOCLIP)
+                       if(this.move_movetype != MOVETYPE_NOCLIP)
                        {
-                               this.movetype = MOVETYPE_NOCLIP;
+                               set_movetype(this, MOVETYPE_NOCLIP);
                                sprint(this, "noclip ON\n");
                                DID_CHEAT();
                        }
                        else
                        {
-                               this.movetype = MOVETYPE_WALK;
+                               set_movetype(this, MOVETYPE_WALK);
                                sprint(this, "noclip OFF\n");
                        }
                        break;
                case "fly":
                        IS_CHEAT(this, 0, argc, 0);
-                       if(this.movetype != MOVETYPE_FLY)
+                       if(this.move_movetype != MOVETYPE_FLY)
                        {
-                               this.movetype = MOVETYPE_FLY;
+                               set_movetype(this, MOVETYPE_FLY);
                                sprint(this, "flymode ON\n");
                                DID_CHEAT();
                        }
                        else
                        {
-                               this.movetype = MOVETYPE_WALK;
+                               set_movetype(this, MOVETYPE_WALK);
                                sprint(this, "flymode OFF\n");
                        }
                        break;
@@ -868,9 +868,9 @@ void Drag_Begin(entity dragger, entity draggee, vector touchpoint)
 {
        float tagscale;
 
-       draggee.dragmovetype = draggee.movetype;
+       draggee.dragmovetype = draggee.move_movetype;
        draggee.draggravity = draggee.gravity;
-       draggee.movetype = MOVETYPE_WALK;
+       set_movetype(draggee, MOVETYPE_WALK);
        draggee.gravity = 0.00001;
        UNSET_ONGROUND(draggee);
        draggee.draggedby = dragger;
@@ -895,10 +895,10 @@ void Drag_Finish(entity dragger)
        if(dragger)
                dragger.dragentity = NULL;
        draggee.draggedby = NULL;
-       draggee.movetype = draggee.dragmovetype;
+       set_movetype(draggee, draggee.dragmovetype);
        draggee.gravity = draggee.draggravity;
 
-       switch(draggee.movetype)
+       switch(draggee.move_movetype)
        {
                case MOVETYPE_TOSS:
                case MOVETYPE_WALK:
index a47e14e162b1d39042fe4efc0f70fa85e2a2a80f..525006c9cec056f3d634c8c2fea06af9f201cc06 100644 (file)
@@ -269,7 +269,7 @@ void PutObserverInServer(entity this)
        this.health = FRAGS_SPECTATOR;
        this.takedamage = DAMAGE_NO;
        this.solid = SOLID_NOT;
-       this.movetype = MOVETYPE_FLY_WORLDONLY; // user preference is controlled by playerprethink
+       set_movetype(this, MOVETYPE_FLY_WORLDONLY); // user preference is controlled by playerprethink
        this.flags = FL_CLIENT | FL_NOTARGET;
        this.armorvalue = 666;
        this.effects = 0;
@@ -481,7 +481,7 @@ void PutClientInServer(entity this)
                this.iscreature = true;
                this.teleportable = TELEPORT_NORMAL;
                this.damagedbycontents = true;
-               this.movetype = MOVETYPE_WALK;
+               set_movetype(this, MOVETYPE_WALK);
                this.solid = SOLID_SLIDEBOX;
                this.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID;
                if (autocvar_g_playerclip_collisions)
@@ -1289,7 +1289,7 @@ void respawn(entity this)
        {
                this.solid = SOLID_NOT;
                this.takedamage = DAMAGE_NO;
-               this.movetype = MOVETYPE_FLY;
+               set_movetype(this, MOVETYPE_FLY);
                this.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
                this.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
                this.effects |= CSQCMODEL_EF_RESPAWNGHOST;
@@ -1675,7 +1675,7 @@ bool SpectateSet(entity this)
        msg_entity = this;
        WriteByte(MSG_ONE, SVC_SETVIEW);
        WriteEntity(MSG_ONE, this.enemy);
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        accuracy_resend(this);
 
        if(!SpectateUpdate(this))
@@ -1925,7 +1925,6 @@ void ObserverThink(entity this)
                MinigameImpulse(this, this.impulse);
                this.impulse = 0;
        }
-       float prefered_movetype;
        if (this.flags & FL_JUMPRELEASED) {
                if (PHYS_INPUT_BUTTON_JUMP(this) && !this.version_mismatch) {
                        this.flags &= ~FL_JUMPRELEASED;
@@ -1936,9 +1935,8 @@ void ObserverThink(entity this)
                                TRANSMUTE(Spectator, this);
                        }
                } else {
-                       prefered_movetype = ((!PHYS_INPUT_BUTTON_USE(this) ? this.cvar_cl_clippedspectating : !this.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
-                       if (this.movetype != prefered_movetype)
-                               this.movetype = prefered_movetype;
+                       int preferred_movetype = ((!PHYS_INPUT_BUTTON_USE(this) ? this.cvar_cl_clippedspectating : !this.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
+                       set_movetype(this, preferred_movetype);
                }
        } else {
                if (!(PHYS_INPUT_BUTTON_ATCK(this) || PHYS_INPUT_BUTTON_JUMP(this))) {
@@ -2420,6 +2418,30 @@ void DrownPlayer(entity this)
        }
 }
 
+void Player_Physics(entity this)
+{
+       this.movetype = ((this.move_qcphysics) ? MOVETYPE_NONE : this.move_movetype);
+
+       if(!this.move_qcphysics)
+               return;
+
+       int mt = this.move_movetype;
+
+       if(mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH || mt == MOVETYPE_PHYSICS)
+       {
+               this.move_qcphysics = false;
+               this.movetype = mt;
+               return;
+       }
+
+       if(!frametime && !this.pm_frametime)
+               return;
+
+       Movetype_Physics_NoMatchTicrate(this, this.pm_frametime, true);
+
+       this.pm_frametime = 0;
+}
+
 /*
 =============
 PlayerPostThink
@@ -2430,6 +2452,8 @@ Called every frame for each client after the physics are run
 .float idlekick_lasttimeleft;
 void PlayerPostThink (entity this)
 {
+       Player_Physics(this);
+
        if (sv_maxidle > 0)
        if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
        if (IS_REAL_CLIENT(this))
index 50ceba31014316ea5cff9e7c0ee528c3d30f681c..098a176c8cc1919eb8a2bfedaef7394cbc12a2e4 100644 (file)
@@ -91,7 +91,8 @@ void CopyBody(entity this, float keepvelocity)
        clone.modelindex = this.modelindex;
        clone.skin = this.skin;
        clone.species = this.species;
-       clone.movetype = this.movetype;
+       clone.move_qcphysics = false; // don't run gamecode logic on clones, too many
+       set_movetype(clone, this.move_movetype);
        clone.solid = this.solid;
        clone.ballistics_density = this.ballistics_density;
        clone.takedamage = this.takedamage;
@@ -151,7 +152,7 @@ void player_anim(entity this)
        int animbits = deadbits;
        if(STAT(FROZEN, this))
                animbits |= ANIMSTATE_FROZEN;
-       if(this.movetype == MOVETYPE_FOLLOW)
+       if(this.move_movetype == MOVETYPE_FOLLOW)
                animbits |= ANIMSTATE_FOLLOW;
        if(this.crouch)
                animbits |= ANIMSTATE_DUCK;
@@ -594,7 +595,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                // view from the floor
                this.view_ofs = '0 0 -8';
                // toss the corpse
-               this.movetype = MOVETYPE_TOSS;
+               set_movetype(this, MOVETYPE_TOSS);
                // shootable corpse
                this.solid = SOLID_CORPSE;
                this.ballistics_density = autocvar_g_ballistics_density_corpse;
index 61104af4d6dce309924b59e4606f8dcd3434ea31..5fbe6423098baefaee5d25f93651c7d2c32e1971 100644 (file)
@@ -837,7 +837,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
        if (!IS_PLAYER(targ) || time >= targ.spawnshieldtime || targ == attacker)
        {
                vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, autocvar_g_balance_damagepush_speedfactor);
-               if(targ.movetype == MOVETYPE_PHYSICS)
+               if(targ.move_movetype == MOVETYPE_PHYSICS)
                {
                        entity farcent = new(farce);
                        farcent.enemy = targ;
index fd3cd08ecfe70d9864117218e9ad2e6dddec0c26..88d63e384c11261fc3cb70499cda902c512822cc 100644 (file)
@@ -76,8 +76,8 @@ void RemoveGrapplingHook(entity pl)
                return;
        remove(pl.hook);
        pl.hook = NULL;
-       if(pl.movetype == MOVETYPE_FLY)
-               pl.movetype = MOVETYPE_WALK;
+       if(pl.move_movetype == MOVETYPE_FLY)
+               set_movetype(pl, MOVETYPE_WALK);
 
        //pl.disableclientprediction = false;
 }
@@ -101,7 +101,7 @@ void GrapplingHook_Stop(entity this)
        this.nextthink = time;
        settouch(this, func_null);
        this.velocity = '0 0 0';
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.hook_length = -1;
 }
 
@@ -220,8 +220,8 @@ void GrapplingHookThink(entity this)
                                this.hook_length = newlength;
                        }
 
-                       if(pull_entity.movetype == MOVETYPE_FLY)
-                               pull_entity.movetype = MOVETYPE_WALK;
+                       if(pull_entity.move_movetype == MOVETYPE_FLY)
+                               set_movetype(pull_entity, MOVETYPE_WALK);
 
                        if(this.realowner.hook_state & HOOK_RELEASING)
                        {
@@ -238,7 +238,7 @@ void GrapplingHookThink(entity this)
                                dv = ((v - v0) * dir) * dir;
                                if(tarzan >= 2)
                                {
-                                       if(this.aiment.movetype == MOVETYPE_WALK || this.aiment.classname == "nade")
+                                       if(this.aiment.move_movetype == MOVETYPE_WALK || this.aiment.classname == "nade")
                                        {
                                                entity aim_ent = ((IS_VEHICLE(this.aiment) && this.aiment.owner) ? this.aiment.owner : this.aiment);
                                                v = v - dv * 0.5;
@@ -280,7 +280,7 @@ void GrapplingHookThink(entity this)
                        if(spd < 50)
                                spd = 0;
                        this.realowner.velocity = dir*spd;
-                       this.realowner.movetype = MOVETYPE_FLY;
+                       set_movetype(this.realowner, MOVETYPE_FLY);
 
                        UNSET_ONGROUND(this.realowner);
                }
@@ -303,14 +303,14 @@ void GrapplingHookThink(entity this)
 
 void GrapplingHookTouch(entity this, entity toucher)
 {
-       if(toucher.movetype == MOVETYPE_FOLLOW)
+       if(toucher.move_movetype == MOVETYPE_FOLLOW)
                return;
        PROJECTILE_TOUCH(this, toucher);
 
        GrapplingHook_Stop(this);
 
        if(toucher)
-               if(toucher.movetype != MOVETYPE_NONE)
+               if(toucher.move_movetype != MOVETYPE_NONE)
                {
                        SetMovetypeFollow(this, toucher);
                        WarpZone_RefSys_BeginAddingIncrementally(this, this.aiment);
@@ -371,7 +371,7 @@ void FireGrapplingHook(entity actor)
        missile.classname = "grapplinghook";
        missile.flags = FL_PROJECTILE;
 
-       missile.movetype = ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY);
+       set_movetype(missile, ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY));
        PROJECTILE_MAKETRIGGER(missile);
 
        //setmodel (missile, MDL_HOOK); // precision set below
index 41366f5ea2a5f1c9a84d9e386774740a774f261e..e79bbcaf76a5dd707acc48b764db9109d0bf13e5 100644 (file)
@@ -48,7 +48,7 @@ void dynlight_find_aiment(entity this)
                objerror (this, "dynlight: no target to follow");
 
        targ = find(NULL, targetname, this.target);
-       this.movetype = MOVETYPE_FOLLOW;
+       set_movetype(this, MOVETYPE_FOLLOW);
        this.aiment = targ;
        this.owner = targ;
        this.punchangle = targ.angles;
@@ -123,7 +123,7 @@ spawnfunc(dynlight)
        if (this.target)
 //     if (!(this.spawnflags & DFOLLOW))
        {
-               this.movetype = MOVETYPE_NOCLIP;
+               set_movetype(this, MOVETYPE_NOCLIP);
                if (!this.speed)
                        this.speed = 100;
                InitializeEntity(this, dynlight_find_path, INITPRIO_FINDTARGET);
index 38e72c7329977c77e6d022c33908f5cc1742c5fd..348f307270d84b52c2ab9a6486318a948a81fdaa 100644 (file)
@@ -165,7 +165,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 
 
 #define G_MODEL_INIT(ent,sol) \
-       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) ent.movetype = MOVETYPE_PHYSICS; \
+       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
        SetBrushEntityModel(ent); \
        ent.use = g_model_setcolormaptoactivator; \
@@ -173,7 +173,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
        if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT;
 
 #define G_CLIENTMODEL_INIT(ent,sol) \
-       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) ent.movetype = MOVETYPE_PHYSICS; \
+       if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
        if(!ent.scale) ent.scale = ent.modelscale; \
        SetBrushEntityModel(ent); \
        ent.use = g_clientmodel_use; \
index dba509b28b8d3e276aba89cac2346d196d1891b9..f3fb1a3224ad9ebd186bdd630476baa733b6e980 100644 (file)
@@ -417,7 +417,7 @@ void InitTrigger(entity this)
        SetMovedir(this);
        this.solid = SOLID_TRIGGER;
        SetBrushEntityModel(this);
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.modelindex = 0;
        this.model = "";
 }
@@ -429,7 +429,7 @@ void InitSolidBSPTrigger(entity this)
        SetMovedir(this);
        this.solid = SOLID_BSP;
        SetBrushEntityModel(this);
-       this.movetype = MOVETYPE_NONE; // why was this PUSH? -div0
+       set_movetype(this, MOVETYPE_NONE); // why was this PUSH? -div0
 //     this.modelindex = 0;
        this.model = "";
 }
@@ -440,7 +440,7 @@ bool InitMovingBrushTrigger(entity this)
 // to mean no restrictions, so use a yaw of 360 instead.
        this.solid = SOLID_BSP;
        SetBrushEntityModel(this);
-       this.movetype = MOVETYPE_PUSH;
+       set_movetype(this, MOVETYPE_PUSH);
        if(this.modelindex == 0)
        {
                objerror(this, "InitMovingBrushTrigger: no brushes found!");
index f2eb1d1186eb59f793c503e97f2333f23a5a5589..409e33cd0c0495a68aa1f4a2769a784813eca76f 100644 (file)
@@ -1488,7 +1488,7 @@ void FixIntermissionClient(entity e)
                e.health = -2342;
                // first intermission phase; voting phase has positive health (used to decide whether to send SVC_FINALE or not)
                e.solid = SOLID_NOT;
-               e.movetype = MOVETYPE_NONE;
+               set_movetype(e, MOVETYPE_NONE);
                e.takedamage = DAMAGE_NO;
                for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
@@ -1984,11 +1984,53 @@ string GotoMap(string m)
                return "Map switch will happen after scoreboard.";
 }
 
+bool autocvar_sv_freezenonclients;
+bool autocvar_sv_gameplayfix_delayprojectiles;
+void Physics_Frame()
+{
+       if(autocvar_sv_freezenonclients)
+               return;
+
+       FOREACH_ENTITY_FLOAT(pure_data, false,
+       {
+               if(IS_CLIENT(it) || it.classname == "" || it.movetype == MOVETYPE_PUSH || it.movetype == MOVETYPE_FAKEPUSH || it.movetype == MOVETYPE_PHYSICS)
+                       continue;
+
+               int mt = it.move_movetype;
+
+               if(mt == MOVETYPE_PUSH || mt == MOVETYPE_FAKEPUSH || mt == MOVETYPE_PHYSICS)
+               {
+                       it.move_qcphysics = false;
+                       it.movetype = mt;
+                       continue;
+               }
+               
+               it.movetype = ((it.move_qcphysics) ? MOVETYPE_NONE : it.move_movetype);
+
+               if(it.move_movetype == MOVETYPE_NONE)
+                       continue;
+
+               if(it.move_qcphysics)
+                       Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false);
+       });
+
+       if(autocvar_sv_gameplayfix_delayprojectiles >= 0)
+               return;
+
+       FOREACH_ENTITY_FLOAT(move_qcphysics, true,
+       {
+               if(IS_CLIENT(it) || is_pure(it) || it.classname == "" || it.move_movetype == MOVETYPE_NONE)
+                       continue;
+               Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false);
+       });
+}
 
 void EndFrame()
 {
        anticheat_endframe();
 
+       Physics_Frame();
+
        FOREACH_CLIENT(IS_REAL_CLIENT(it), {
                entity e = IS_SPEC(it) ? it.enemy : it;
                if (e.typehitsound) {
index cf2b25acff05fb776137775c59ac07f67ce19d63..64e10a2f2e0fdb01b40afb4ccfc06c137ddf4acc 100644 (file)
@@ -99,9 +99,9 @@ void spawn_item_key(entity this)
                this.noalign = 1;
 
        if (this.noalign)
-               this.movetype = MOVETYPE_NONE;
+               set_movetype(this, MOVETYPE_NONE);
        else
-               this.movetype = MOVETYPE_TOSS;
+               set_movetype(this, MOVETYPE_TOSS);
 
        precache_sound(this.noise);
 
index 2c206cf1a78112959ba04c9efefd4c966223235f..2686e05539db85165b9d043b4009b25e01c1e029 100644 (file)
@@ -1319,7 +1319,7 @@ void detach_sameorigin(entity e)
 
 void follow_sameorigin(entity e, entity to)
 {
-    e.movetype = MOVETYPE_FOLLOW; // make the hole follow
+    set_movetype(e, MOVETYPE_FOLLOW); // make the hole follow
     e.aiment = to; // make the hole follow bmodel
     e.punchangle = to.angles; // the original angles of bmodel
     e.view_ofs = e.origin - to.origin; // relative origin
@@ -1328,7 +1328,7 @@ void follow_sameorigin(entity e, entity to)
 
 void unfollow_sameorigin(entity e)
 {
-    e.movetype = MOVETYPE_NONE;
+    set_movetype(e, MOVETYPE_NONE);
 }
 
 entity gettaginfo_relative_ent;
@@ -1350,7 +1350,7 @@ vector gettaginfo_relative(entity e, float tag)
 void SetMovetypeFollow(entity ent, entity e)
 {
        // FIXME this may not be warpzone aware
-       ent.movetype = MOVETYPE_FOLLOW; // make the hole follow
+       set_movetype(ent, MOVETYPE_FOLLOW); // make the hole follow
        ent.solid = SOLID_NOT; // MOVETYPE_FOLLOW is always non-solid - this means this cannot be teleported by warpzones any more! Instead, we must notice when our owner gets teleported.
        ent.aiment = e; // make the hole follow bmodel
        ent.punchangle = e.angles; // the original angles of bmodel
@@ -1361,14 +1361,14 @@ void SetMovetypeFollow(entity ent, entity e)
 }
 void UnsetMovetypeFollow(entity ent)
 {
-       ent.movetype = MOVETYPE_FLY;
+       set_movetype(ent, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(ent);
        ent.aiment = NULL;
 }
 float LostMovetypeFollow(entity ent)
 {
 /*
-       if(ent.movetype != MOVETYPE_FOLLOW)
+       if(ent.move_movetype != MOVETYPE_FOLLOW)
                if(ent.aiment)
                        error("???");
 */
index b3a06416cd1abd330b1f96ef8339d5d9f5894e00..0383d2e50986537500f104709d771cef84e0d625 100644 (file)
@@ -334,7 +334,7 @@ void ctf_CaptureShield_Spawn(entity flag)
        settouch(shield, ctf_CaptureShield_Touch);
        setcefc(shield, ctf_CaptureShield_Customize);
        shield.effects = EF_ADDITIVE;
-       shield.movetype = MOVETYPE_NOCLIP;
+       set_movetype(shield, MOVETYPE_NOCLIP);
        shield.solid = SOLID_TRIGGER;
        shield.avelocity = '7 0 11';
        shield.scale = 0.5;
@@ -355,7 +355,7 @@ void ctf_Handle_Drop(entity flag, entity player, int droptype)
        player = (player ? player : flag.pass_sender);
 
        // main
-       flag.movetype = MOVETYPE_TOSS;
+       set_movetype(flag, MOVETYPE_TOSS);
        flag.takedamage = DAMAGE_YES;
        flag.angles = '0 0 0';
        flag.health = flag.max_flag_health;
@@ -414,7 +414,7 @@ void ctf_Handle_Retrieve(entity flag, entity player)
                setattachment(flag, player, "");
                setorigin(flag, FLAG_CARRY_OFFSET);
        }
-       flag.movetype = MOVETYPE_NONE;
+       set_movetype(flag, MOVETYPE_NONE);
        flag.takedamage = DAMAGE_NO;
        flag.solid = SOLID_NOT;
        flag.angles = '0 0 0';
@@ -480,7 +480,7 @@ void ctf_Handle_Throw(entity player, entity receiver, int droptype)
                        ctf_CalculatePassVelocity(flag, targ_origin, player.origin, false);
 
                        // main
-                       flag.movetype = MOVETYPE_FLY;
+                       set_movetype(flag, MOVETYPE_FLY);
                        flag.takedamage = DAMAGE_NO;
                        flag.pass_sender = player;
                        flag.pass_target = receiver;
@@ -668,7 +668,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        }
 
        // flag setup
-       flag.movetype = MOVETYPE_NONE;
+       set_movetype(flag, MOVETYPE_NONE);
        flag.takedamage = DAMAGE_NO;
        flag.solid = SOLID_NOT;
        flag.angles = '0 0 0';
@@ -937,9 +937,9 @@ void ctf_FlagThink(entity this)
                                        if(pointcontents(midpoint + FLAG_FLOAT_OFFSET) == CONTENT_WATER)
                                                { this.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater; }
                                        else
-                                               { this.movetype = MOVETYPE_FLY; }
+                                               { set_movetype(this, MOVETYPE_FLY); }
                                }
-                               else if(this.movetype == MOVETYPE_FLY) { this.movetype = MOVETYPE_TOSS; }
+                               else if(this.move_movetype == MOVETYPE_FLY) { set_movetype(this, MOVETYPE_TOSS); }
                        }
                        if(autocvar_g_ctf_flag_return_dropped)
                        {
@@ -1157,7 +1157,7 @@ void ctf_RespawnFlag(entity flag)
        setattachment(flag, NULL, "");
        setorigin(flag, flag.ctf_spawnorigin);
 
-       flag.movetype = ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS);
+       set_movetype(flag, ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS));
        flag.takedamage = DAMAGE_NO;
        flag.health = flag.max_flag_health;
        flag.solid = SOLID_TRIGGER;
@@ -1318,13 +1318,13 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        {
                flag.dropped_origin = flag.origin;
                flag.noalign = true;
-               flag.movetype = MOVETYPE_NONE;
+               set_movetype(flag, MOVETYPE_NONE);
        }
        else // drop to floor, automatically find a platform and set that as spawn origin
        {
                flag.noalign = false;
                droptofloor(flag);
-               flag.movetype = MOVETYPE_TOSS;
+               set_movetype(flag, MOVETYPE_NONE);
        }
 
        InitializeEntity(flag, ctf_DelayedFlagSetup, INITPRIO_SETLOCATION);
@@ -2334,7 +2334,7 @@ MUTATOR_HOOKFUNCTION(ctf, MatchEnd)
                        case FLAG_PASSING:
                        {
                                // lock the flag, game is over
-                               flag.movetype = MOVETYPE_NONE;
+                               set_movetype(flag, MOVETYPE_NONE);
                                flag.takedamage = DAMAGE_NO;
                                flag.solid = SOLID_NOT;
                                flag.nextthink = false; // stop thinking
index bfddc30b01bbbc7439a2fb76ab793e0662db4e41..444fe5692e8bee057c004ac997e408b095ed934c 100644 (file)
@@ -127,7 +127,7 @@ MUTATOR_HOOKFUNCTION(cts, PlayerPhysics)
                if(player.race_penalty)
                {
                        player.velocity = '0 0 0';
-                       player.movetype = MOVETYPE_NONE;
+                       set_movetype(player, MOVETYPE_NONE);
                        player.disableclientprediction = 2;
                }
        }
index 00cdf0d6872f54e0e17fb633f4ece9d9d4ee8820..1ce62672d8b6e5d9eaf6c5ffb0d608dcced47edf 100644 (file)
@@ -96,7 +96,7 @@ void ka_RespawnBall(entity this) // runs whenever the ball needs to be relocated
        }
 
        makevectors(this.angles);
-       this.movetype = MOVETYPE_BOUNCE;
+       set_movetype(this, MOVETYPE_BOUNCE);
        this.velocity = '0 0 200';
        this.angles = '0 0 0';
        this.effects = autocvar_g_keepawayball_effects;
@@ -152,7 +152,7 @@ void ka_TouchEvent(entity this, entity toucher) // runs any time that the ball c
 
        // make the ball invisible/unable to do anything/set up time scoring
        this.velocity = '0 0 0';
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        this.effects |= EF_NODRAW;
        settouch(this, func_null);
        setthink(this, ka_TimeScoring);
@@ -191,7 +191,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
 
        // reset the ball
        setattachment(ball, NULL, "");
-       ball.movetype = MOVETYPE_BOUNCE;
+       set_movetype(ball, MOVETYPE_BOUNCE);
        ball.wait = time + 1;
        settouch(ball, ka_TouchEvent);
        setthink(ball, ka_RespawnBall);
@@ -490,7 +490,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star
        e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
        e.takedamage = DAMAGE_YES;
        e.solid = SOLID_TRIGGER;
-       e.movetype = MOVETYPE_BOUNCE;
+       set_movetype(e, MOVETYPE_BOUNCE);
        e.glow_color = autocvar_g_keepawayball_trail_color;
        e.glow_trail = true;
        e.flags = FL_ITEM;
index 9ac66b5f577db2bb247ea5c6802a966e143b4f33..ab23b686face51b85fe4d849b9eefb35bb5148a7 100644 (file)
@@ -307,7 +307,7 @@ void kh_Key_Attach(entity key)  // runs when a player picks up a key and several
 #endif
        key.flags = 0;
        key.solid = SOLID_NOT;
-       key.movetype = MOVETYPE_NONE;
+       set_movetype(key, MOVETYPE_NONE);
        key.team = key.owner.team;
        key.nextthink = time;
        key.damageforcescale = 0;
@@ -346,7 +346,7 @@ void kh_Key_Detach(entity key) // runs every time a key is dropped or lost. Runs
 #endif
        key.flags = FL_ITEM;
        key.solid = SOLID_TRIGGER;
-       key.movetype = MOVETYPE_TOSS;
+       set_movetype(key, MOVETYPE_TOSS);
        key.pain_finished = time + autocvar_g_balance_keyhunt_delay_return;
        key.damageforcescale = autocvar_g_balance_keyhunt_damageforcescale;
        key.takedamage = DAMAGE_YES;
index 132eba1620515b6e8c7d9478029deeac3d38cca5..3043d47145d0dceb7ab99d30274fec3cf72046b3 100644 (file)
@@ -159,7 +159,7 @@ MUTATOR_HOOKFUNCTION(rc, PlayerPhysics)
                if(player.race_penalty)
                {
                        player.velocity = '0 0 0';
-                       player.movetype = MOVETYPE_NONE;
+                       set_movetype(player, MOVETYPE_NONE);
                        player.disableclientprediction = 2;
                }
        }
index 9bc0855f5b3c38c82ec67375925c141ad82962a8..34c886fa10ebc67029ab433831117ccecb1e2fcb 100644 (file)
@@ -34,7 +34,7 @@ void playerdemo_open_read(entity this, string f)
        this.playerdemo_starttime = time - 1;
        this.playerdemo_time = stof(fgets(this.playerdemo_fh));
        this.playerdemo_time += this.playerdemo_starttime;
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
        LOG_INFO("playerdemo: ", this.netname, " reading from ", f, "\n");
 }
 void playerdemo_open_write(entity this, string f)
index bf0a955515f1a4dfeb39fea923083571a8a8e0e3..2b5302af22995f269f7b637289dcd9b0e6738e7c 100644 (file)
@@ -556,7 +556,7 @@ void spawn_flocker(entity this)
     setthink(flocker, flocker_think);
     flocker.nextthink  = time + random() * 5;
     PROJECTILE_MAKETRIGGER(flocker);
-    flocker.movetype   = MOVETYPE_BOUNCEMISSILE;
+    flocker.move_movetype   = MOVETYPE_BOUNCEMISSILE;
     flocker.effects    = EF_LOWPRECISION;
     flocker.velocity   = randomvec() * 300;
     flocker.angles     = vectoangles(flocker.velocity);
@@ -649,7 +649,7 @@ spawnfunc(flockerspawn)
 
     this.enemy.scale     = 3;
     this.enemy.effects   = EF_LOWPRECISION;
-    this.enemy.movetype  = MOVETYPE_BOUNCEMISSILE;
+    this.enemy.move_movetype  = MOVETYPE_BOUNCEMISSILE;
     PROJECTILE_MAKETRIGGER(this.enemy);
     setthink(this.enemy, flocker_hunter_think);
     this.enemy.nextthink = time + 10;
index bc6814879122a116786dfa7074b92eed0766f617..bf24e09b71f350ed58210f1a98c8363a5a777ea1 100644 (file)
@@ -119,7 +119,7 @@ void CreatureFrame_FallDamage(entity this)
 void CreatureFrame_All()
 {
        FOREACH_ENTITY_FLOAT(damagedbycontents, true, {
-               if (it.movetype == MOVETYPE_NOCLIP) continue;
+               if (it.move_movetype == MOVETYPE_NOCLIP) continue;
                CreatureFrame_Liquids(it);
                CreatureFrame_FallDamage(it);
                it.oldvelocity = it.velocity;
@@ -368,6 +368,8 @@ LABEL(cvar_fail)
                return;
        }
 
+       this.move_movetype = this.movetype;
+
        // support special -1 and -2 angle from radiant
        if (this.angles == '0 -1 0')
                this.angles = '-90 0 0';
index 7e7478e9b8ea8aedd9e71f0b49f839084849bf93..caa367e5d708ac96ef0f047a7fb3f1fdeac299c0 100644 (file)
@@ -83,7 +83,7 @@ void CSQCProjectile(entity e, float clientanimate, int type, float docull)
 
        e.csqcprojectile_clientanimate = clientanimate;
 
-       if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE)
+       if(e.move_movetype == MOVETYPE_TOSS || e.move_movetype == MOVETYPE_BOUNCE)
        {
                if(e.gravity == 0)
                        e.gravity = 1;