]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Sun, 9 Oct 2016 01:52:39 +0000 (11:52 +1000)
committerMario <mario@smbclan.net>
Sun, 9 Oct 2016 01:52:39 +0000 (11:52 +1000)
qcsrc/client/wall.qc
qcsrc/common/physics/player.qc
qcsrc/common/triggers/trigger/delay.qc
qcsrc/common/triggers/triggers.qc
qcsrc/ecs/systems/sv_physics.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/g_models.qc

index 01a86bb1ee44d2490402cac124a41b35c1229715..64916ad8c17d05251f940ed0ae9e02e340ffb8bf 100644 (file)
@@ -213,11 +213,11 @@ NET_HANDLE(ENT_CLIENT_WALL, bool isnew)
                        this.movedir_z = ReadCoord();
                        this.lip = ReadByte() / 255.0;
                }
-               this.fade_start = ReadShort();
-               this.fade_end = ReadShort();
-               this.alpha_max = ReadShort();
-               this.alpha_min = ReadShort();
-               this.inactive = ReadShort();
+               this.fade_start = ReadByte();
+               this.fade_end = ReadByte();
+               this.alpha_max = ReadByte();
+               this.alpha_min = ReadByte();
+               this.inactive = ReadByte();
                this.fade_vertical_offset = ReadShort();
                BGMScript_InitEntity(this);
        }
index 5978fb6582fae6c7a5d6184f5eecfcaec8035645..f407be711134657178e65f1c957c808dd5358542 100644 (file)
@@ -39,6 +39,13 @@ void Physics_UpdateStats(entity this, float maxspd_mod)
        STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
        STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
 
+       STAT(PL_MIN, this) = autocvar_sv_player_mins;
+       STAT(PL_MAX, this) = autocvar_sv_player_maxs;
+       STAT(PL_VIEW_OFS, this) = autocvar_sv_player_viewoffset;
+       STAT(PL_CROUCH_MIN, this) = autocvar_sv_player_crouch_mins;
+       STAT(PL_CROUCH_MAX, this) = autocvar_sv_player_crouch_maxs;
+       STAT(PL_CROUCH_VIEW_OFS, this) = autocvar_sv_player_crouch_viewoffset;
+
        // old stats
        // fix some new settings
        STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor", autocvar_sv_airaccel_qw_stretchfactor);
index c5049da3931f73b8eab4288601d30fd71426d25a..dc1a781f81a0c81933fae9d47f63baf53506555a 100644 (file)
@@ -3,7 +3,7 @@
 void delay_use(entity this, entity actor, entity trigger)
 {
    setthink(this, SUB_UseTargets_self);
-   this.nextthink = this.wait;
+   this.nextthink = time + this.wait;
 }
 
 void delay_reset(entity this)
index 8a63e3b6836a428c2bdfcdf7e7e422d581f73821..1f5139896d19eea55fa89b5c5d8085a9f2b37e9f 100644 (file)
@@ -203,6 +203,7 @@ void SUB_UseTargets_Ex(entity this, entity actor, entity trigger, bool preventRe
                t.target2 = this.target2;
                t.target3 = this.target3;
                t.target4 = this.target4;
+               t.antiwall_flag = this.antiwall_flag;
                return;
        }
 
index 904ebba3fe5ccbea2b1f1aefaa55f502dd67450b..76e43eb0badd58329a8ceb4055d792f9407ee399 100644 (file)
@@ -4,6 +4,7 @@ void sys_phys_fix(entity this, float dt)
 {
        WarpZone_PlayerPhysics_FixVAngle(this);
        Physics_UpdateStats(this, PHYS_HIGHSPEED(this));
+       this.oldmovement = this.movement;
 }
 
 bool sys_phys_override(entity this, float dt)
index dc3951ee9f968b34ffa4106a5294fd24c3e7588d..ec35ccb616baa4835bcde47ef5b576fb790f7896 100644 (file)
@@ -619,8 +619,8 @@ void PutClientInServer(entity this)
                this.drawonlytoclient = NULL;
 
                this.crouch = false;
-               this.view_ofs = STAT(PL_VIEW_OFS, NULL);
-               setsize(this, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL));
+               this.view_ofs = STAT(PL_VIEW_OFS, this);
+               setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
                this.spawnorigin = spot.origin;
                setorigin(this, spot.origin + '0 0 1' * (1 - this.mins.z - 24));
                // don't reset back to last position, even if new position is stuck in solid
@@ -1612,7 +1612,7 @@ void SetZoomState(entity this, float z)
 void GetPressedKeys(entity this)
 {
        MUTATOR_CALLHOOK(GetPressedKeys, this);
-       int keys = this.pressedkeys;
+       int keys = STAT(PRESSED_KEYS, this);
        keys = BITSET(keys, KEY_FORWARD,        this.movement.x > 0);
        keys = BITSET(keys, KEY_BACKWARD,       this.movement.x < 0);
        keys = BITSET(keys, KEY_RIGHT,          this.movement.y > 0);
@@ -1622,7 +1622,9 @@ void GetPressedKeys(entity this)
        keys = BITSET(keys, KEY_CROUCH,         PHYS_INPUT_BUTTON_CROUCH(this));
        keys = BITSET(keys, KEY_ATCK,           PHYS_INPUT_BUTTON_ATCK(this));
        keys = BITSET(keys, KEY_ATCK2,          PHYS_INPUT_BUTTON_ATCK2(this));
-       this.pressedkeys = keys;
+       this.pressedkeys = keys; // store for other users
+
+       STAT(PRESSED_KEYS, this) = keys;
 }
 
 /*
@@ -1655,7 +1657,7 @@ void SpectateCopy(entity this, entity spectatee)
        this.hit_time = spectatee.hit_time;
        this.strength_finished = spectatee.strength_finished;
        this.invincible_finished = spectatee.invincible_finished;
-       this.pressedkeys = spectatee.pressedkeys;
+       STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
        this.weapons = spectatee.weapons;
        this.vortex_charge = spectatee.vortex_charge;
        this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
index e60743c51397f2e2eb8fa0fb73f79a4c8a694898..5b67aeb39408d0fbcf1e8a49450761d05ff24c8a 100644 (file)
@@ -261,7 +261,7 @@ bool independent_players;
 
 string clientstuff;
 .float phase;
-.int pressedkeys = _STAT(PRESSED_KEYS);
+.int pressedkeys;
 
 .string fog;
 
index 348f307270d84b52c2ab9a6486318a948a81fdaa..58fb26a4ed4a0acd1ed272252e3dbeac39bf7257 100644 (file)
@@ -152,11 +152,11 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
                        WriteCoord(MSG_ENTITY, this.movedir.z);
                        WriteByte(MSG_ENTITY, floor(this.lip * 255));
                }
-               WriteShort(MSG_ENTITY, this.fade_start);
-               WriteShort(MSG_ENTITY, this.fade_end);
-               WriteShort(MSG_ENTITY, this.alpha_max);
-               WriteShort(MSG_ENTITY, this.alpha_min);
-               WriteShort(MSG_ENTITY, this.inactive);
+               WriteByte(MSG_ENTITY, this.fade_start);
+               WriteByte(MSG_ENTITY, this.fade_end);
+               WriteByte(MSG_ENTITY, this.alpha_max);
+               WriteByte(MSG_ENTITY, this.alpha_min);
+               WriteByte(MSG_ENTITY, this.inactive);
                WriteShort(MSG_ENTITY, this.fade_vertical_offset);
        }