]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/TeamplayOverhaul
authorLyberta <lyberta@lyberta.net>
Tue, 10 Jul 2018 04:06:30 +0000 (07:06 +0300)
committerLyberta <lyberta@lyberta.net>
Tue, 10 Jul 2018 04:06:30 +0000 (07:06 +0300)
14 files changed:
1  2 
qcsrc/common/gamemodes/gamemode/assault/assault.qc
qcsrc/common/gamemodes/gamemode/clanarena/clanarena.qc
qcsrc/common/gamemodes/gamemode/domination/domination.qc
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/t_items.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/client.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/mutators/events.qh
qcsrc/server/player.qc
qcsrc/server/player.qh

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0b9e36b5503d79692d00a05212c45c68732acc75,5bd4b59894e964fcd6b0850a3f67232c8f38a79c..3755da96386ed98e6b10f9a754185a7f6b487951
@@@ -664,6 -666,30 +666,15 @@@ void PlayerDamage(entity this, entity i
        }
  }
  
 -bool MoveToTeam(entity client, int team_colour, int type)
 -{
 -      int lockteams_backup = lockteams;  // backup any team lock
 -      lockteams = 0;  // disable locked teams
 -      TeamchangeFrags(client);  // move the players frags
 -      if (!SetPlayerTeamSimple(client, team_colour))
 -      {
 -              return false;
 -      }
 -      Damage(client, client, client, 100000, DEATH_AUTOTEAMCHANGE.m_id, DMG_NOWEP, client.origin, '0 0 0');  // kill the player
 -      lockteams = lockteams_backup;  // restore the team lock
 -      LogTeamchange(client.playerid, client.team, type);
 -      return true;
 -}
 -
+ bool PlayerHeal(entity targ, entity inflictor, float amount, float limit)
+ {
+       if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= limit)
+               return false;
+       GiveResourceWithLimit(targ, RESOURCE_HEALTH, amount, limit);
+       return true;
+ }
  /**
   * message "": do not say, just test flood control
   * return value:
index 8d6bc51ae1b3d07d4490a62945c67bdf4424440f,8c9bac9b62aaa8e94ea4a594e33f6b680f67d74c..1c38a9fbebf3012b1d87029e26659457d7548a1c
@@@ -30,6 -30,15 +30,8 @@@ void calculate_player_respawn_time(enti
  
  void ClientKill_Now_TeamChange(entity this);
  
 -/// \brief Moves player to the specified team.
 -/// \param[in,out] client Client to move.
 -/// \param[in] team_colour Color of the team.
 -/// \param[in] type ???
 -/// \return True on success, false otherwise.
 -bool MoveToTeam(entity client, float team_colour, float type);
 -
  void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
  
+ bool PlayerHeal(entity targ, entity inflictor, float amount, float limit);
  int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);