]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into mirceakitsune/damage_effects
authorSamual <samual@xonotic.org>
Thu, 12 Jan 2012 19:00:00 +0000 (14:00 -0500)
committerSamual <samual@xonotic.org>
Thu, 12 Jan 2012 19:00:00 +0000 (14:00 -0500)
Conflicts:
qcsrc/common/util.qh

1  2 
defaultXonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/common/util.qh
qcsrc/server/cl_player.qc

diff --combined defaultXonotic.cfg
index 0ac407ea3de34658820573b38e0c6ebaaf1ea27f,52c14b2be90d9f41000144d0ad6a9060b27e3e35..120ed42cf1d808530e444f7f4f2cc82bd95abba0
@@@ -321,17 -321,10 +321,18 @@@ set g_telefrags_teamplay 1 "never telef
  set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
  set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
  
 +set cl_damageeffect 1 "enable weapon damage effects. 1 enables the feature on skeletal models, 2 on any model"
 +set cl_damageeffect_ticrate 0.1 "particle spawn rate"
 +set cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
 +set cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
 +set cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
 +set cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
 +set cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
 +
  set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
  set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
  set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
+ set cl_deathglow 0.8 "number of seconds during which dead bodies glow out"
  
  set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
  
@@@ -445,6 -438,7 +446,7 @@@ set bot_ai_aimskill_order_filter_5th 0.
  
  // waypoint editor enable
  set g_waypointeditor 0
+ set g_waypointeditor_auto 0 "Automatically create waypoints for bots while playing; BEWARE, this currently creates too many of them"
  set bot_ignore_bots 0 "When set, bots don't shoot at other bots"
  set bot_join_empty 0  "When set, bots also play if no player has joined the server"
  set bot_vs_human 0    "Bots and humans play in different teams when set. positive values to make an all-bot blue team, set to negative values to make an all-bot red team, the absolute value is the ratio bots vs humans (1 for equal count). Changes will be correctly applied only from the next game"
index fae6dd8db5ff90cb59f6f83ee86caeef3c92c559,705e2c51954524060fdd20ba399fd236c074f3e8..16203a5d28003cbc628118f05a918d1049cf60a8
@@@ -373,13 -373,6 +373,13 @@@ var float autocvar_cl_eventchase_distan
  var float autocvar_cl_eventchase_speed = 1.3;
  float autocvar_cl_lerpexcess;
  string autocvar__togglezoom;
 +float autocvar_cl_damageeffect;
 +float autocvar_cl_damageeffect_ticrate;
 +float autocvar_cl_damageeffect_bones;
 +float autocvar_cl_damageeffect_distribute;
 +float autocvar_cl_damageeffect_lifetime;
 +float autocvar_cl_damageeffect_lifetime_min;
 +float autocvar_cl_damageeffect_lifetime_max;
  float autocvar_cl_playerdetailreduction;
  float autocvar_cl_loddistance1 = 1024;
  float autocvar_cl_loddistance2 = 4096;
@@@ -391,3 -384,4 +391,4 @@@ float autocvar_cl_forcemyplayercolors
  float autocvar__cl_playerskin;
  string autocvar__cl_playermodel;
  float autocvar_cl_precacheplayermodels;
+ float autocvar_cl_deathglow;
diff --combined qcsrc/common/util.qh
index 436299c51686c1d845d07cdad93e0b4dbc652eed,4b0526815d65763eb11f2cbe7b51e2596a060ec4..f4955ea065b4eedc1784c383e00d8a4e732de486
@@@ -291,7 -291,9 +291,14 @@@ float InterpretBoolean(string input)
  // generic shutdown handler
  void Shutdown();
  
 +#ifndef MENUQC
 +// loops through the tags of model v using counter tagnum
 +#define FOR_EACH_TAG(v) float tagnum; for(tagnum = 1, gettaginfo(v, tagnum);; tagnum++, gettaginfo(v, tagnum)) if not(gettaginfo_name) break; else
 +#endif
++
+ #ifdef SVQC
+ void WriteApproxPastTime(float dst, float t);
+ #endif
+ #ifdef CSQC
+ float ReadApproxPastTime();
+ #endif
index 459835918d856e32e7e766fb6d12af25e4a4030f,15173b9ad4bfccb434c1d52980ccee57e3e21d76..49b52555f6ebb0734b8ee371a3b33f08b5cf8466
@@@ -124,8 -124,6 +124,6 @@@ void WeaponStats_LogKill(float awep, fl
  .entity pusher;
  .float pushltime;
  
- .float oldcolormap; // also used in cl_client.c:void respawn(void)
  .float CopyBody_nextthink;
  .void(void) CopyBody_think;
  void CopyBody_Think(void)
@@@ -151,7 -149,7 +149,7 @@@ void CopyBody(float keepvelocity
        self = spawn();
        self.enemy = oldself;
        self.lip = oldself.lip;
-       self.colormap = oldself.oldcolormap;
+       self.colormap = oldself.colormap;
        self.iscreature = oldself.iscreature;
        self.damagedbycontents = oldself.damagedbycontents;
        self.angles = oldself.angles;
        self.animstate_endtime = oldself.animstate_endtime;
        self.animstate_override = oldself.animstate_override;
        self.animstate_looping = oldself.animstate_looping;
+       self.dphitcontentsmask = oldself.dphitcontentsmask;
+       self.death_time = oldself.death_time;
        self.frame = oldself.frame;
        self.pain_finished = oldself.pain_finished;
        self.health = oldself.health;
  
        Drag_MoveDrag(oldself, self);
  
 +      self.owner = oldself;
 +
        if(self.colormap <= maxclients && self.colormap > 0)
                self.colormap = 1024 + oldself.clientcolors;
  
@@@ -423,7 -421,6 +423,7 @@@ void PlayerCorpseDamage (entity inflict
                Violence_GibSplash(self, 1, 1, attacker);
                self.alpha = -1;
                self.solid = SOLID_NOT; // restore later
 +              self.takedamage = DAMAGE_NO; // restore later
        }
  }
  
@@@ -763,13 -760,14 +763,14 @@@ void PlayerDamage (entity inflictor, en
                if(!waves)
                        waves = autocvar_g_respawn_waves;
                if(waves)
-                       self.death_time = ceil((time + sdelay) / waves) * waves;
+                       self.respawn_time = ceil((time + sdelay) / waves) * waves;
                else
-                       self.death_time = time + sdelay;
-               if((sdelay + waves >= 5.0) && (self.death_time - time > 1.75))
+                       self.respawn_time = time + sdelay;
+               if((sdelay + waves >= 5.0) && (self.respawn_time - time > 1.75))
                        self.respawn_countdown = 10; // first number to count down from is 10
                else
                        self.respawn_countdown = -1; // do not count down
+               self.death_time = time;
                if (random() < 0.5)
                        setanim(self, self.anim_die1, FALSE, TRUE, TRUE);
                else
@@@ -981,8 -979,9 +982,9 @@@ float Say(entity source, float teamsay
        if(!privatesay)
        if(source.classname != "player")
        {
-               if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !inWarmupStage))
-                       teamsay = -1; // spectators
+               if not(intermission_running)
+                       if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !inWarmupStage))
+                               teamsay = -1; // spectators
        }
  
        if(flood)
  
        if(sourcemsgstr != "" && ret != 0)
        {
-               if(ret < 0) // fake
+               if(ret < 0) // faked message, because the player is muted
                {
                        sprint(source, sourcemsgstr);
                        if(sourcecmsgstr != "" && !privatesay)
                                centerprint(source, sourcecmsgstr);
                }
-               else if(privatesay)
+               else if(privatesay) // private message, between 2 people only, not sent to server console
                {
                        sprint(source, sourcemsgstr);
                        sprint(privatesay, msgstr);
                        if(cmsgstr != "")
                                centerprint(privatesay, cmsgstr);
                }
-               else if(teamsay > 0)
+               else if(teamsay > 0) // team message, only sent to team mates
                {
                        sprint(source, sourcemsgstr);
+                       //print(msgstr); // send to server console too
                        if(sourcecmsgstr != "")
                                centerprint(source, sourcecmsgstr);
                        FOR_EACH_REALPLAYER(head) if(head.team == source.team)
                                                centerprint(head, cmsgstr);
                                }
                }
-               else if(teamsay < 0)
+               else if(teamsay < 0) // spectator message, only sent to spectators
                {
                        sprint(source, sourcemsgstr);
+                       //print(msgstr); // send to server console too
                        FOR_EACH_REALCLIENT(head) if(head.classname != "player")
                                if(head != source)
                                        sprint(head, msgstr);
                }
-               else if(sourcemsgstr != msgstr)
+               else if(sourcemsgstr != msgstr) // trimmed/server fixed message, sent to all players
                {
                        sprint(source, sourcemsgstr);
+                       //print(msgstr); // send to server console too
                        FOR_EACH_REALCLIENT(head)
                                if(head != source)
                                        sprint(head, msgstr);
                }
                else
-                       bprint(msgstr);
+                       bprint(msgstr); // entirely normal message, sent to all players -- bprint sends to server console too.
        }
  
        return ret;