Windows: Fixed more C4100

This commit is contained in:
Walter Julius Hennecke 2012-12-31 16:19:55 +01:00
parent 2024236a3f
commit 09b04cfb89
41 changed files with 747 additions and 551 deletions

View File

@ -233,7 +233,7 @@ void DocFileOutput::OutputArguments(Event *ev)
//================================================================
void DocFileOutput::OutputArgument(EventArgDef *evarg)
{
Q_UNUSED(evarg)
Q_UNUSED(evarg);
// Function does nothing. This is the last level of nesting, and there
// is nothing else to go print from here.
}

View File

@ -124,7 +124,7 @@ void PlayAnim::Begin( Actor &self )
// Returns: BehaviorReturnCode_t
//
//--------------------------------------------------------------
BehaviorReturnCode_t PlayAnim::Evaluate( Actor &self )
BehaviorReturnCode_t PlayAnim::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -387,6 +387,7 @@ BehaviorReturnCode_t PlayAnim::evaluateStateSetup()
//--------------------------------------------------------------
void PlayAnim::failureStateSetup( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -438,5 +439,6 @@ BehaviorReturnCode_t PlayAnim::evaluateStateAnimate()
//--------------------------------------------------------------
void PlayAnim::failureStateAnimate( const str& failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -51,17 +51,17 @@ class Strategos
{
public:
Strategos() { }
Strategos( Actor *act ) { Q_UNUSED(act) }
Strategos( Actor *act ) { Q_UNUSED(act); }
virtual ~Strategos() { }
virtual void Evaluate() { }
virtual void NotifySightStatusChanged ( Entity *enemy , qboolean canSee ) { Q_UNUSED(enemy) Q_UNUSED(canSee) }
virtual void NotifyDamageChanged( Entity *enemy , float damage ) { Q_UNUSED(enemy) Q_UNUSED(damage) }
virtual void NotifySightStatusChanged ( Entity *enemy , qboolean canSee ) { Q_UNUSED(enemy); Q_UNUSED(canSee); }
virtual void NotifyDamageChanged( Entity *enemy , float damage ) { Q_UNUSED(enemy); Q_UNUSED(damage); }
virtual void Attack ( Entity *enemy ) { Q_UNUSED(enemy) }
virtual void Attack ( Entity *enemy ) { Q_UNUSED(enemy); }
virtual void DoArchive( Archiver & , Actor * );
void Archive( Archiver &arc );
virtual void SetBehaviorPackage( const str &packageName ) { Q_UNUSED(packageName) }
virtual void SetBehaviorPackage( const str &packageName ) { Q_UNUSED(packageName); }
virtual float GetCheckYawMin() { assert( 0 ); return 0; }
virtual float GetCheckYawMax() { assert( 0 ); return 0; }

View File

@ -83,6 +83,8 @@ int BotIsFirstInRankings(bot_state_t *bs) {
// static int maxclients->integer;
// playerState_t ps;
Q_UNUSED(bs);
return qfalse;
/* FIXME
score = bs->cur_ps.persistant[PERS_SCORE];
@ -110,6 +112,8 @@ int BotIsLastInRankings(bot_state_t *bs) {
// char buf[MAX_INFO_STRING];
// playerState_t ps;
Q_UNUSED(bs);
return qfalse;
/* FIXME
score = bs->cur_ps.persistant[PERS_SCORE];
@ -778,6 +782,8 @@ int BotChat_EnemySuicide(bot_state_t *bs) {
// char name[32];
// float rnd;
Q_UNUSED(bs);
return qfalse;
/* FIXME
if (bot_nochat.integer) return qfalse;
@ -815,6 +821,8 @@ int BotChat_HitTalking(bot_state_t *bs) {
// char name[32], *weap;
// int lasthurt_client;
// float rnd;
Q_UNUSED(bs);
/*
if (bot_nochat.integer) return qfalse;
@ -857,6 +865,8 @@ int BotChat_HitNoDeath(bot_state_t *bs) {
// float rnd;
// int lasthurt_client;
// aas_entityinfo_t entinfo;
Q_UNUSED(bs);
/*
lasthurt_client = g_entities[bs->client].client->lasthurt_client;
if (!lasthurt_client) return qfalse;
@ -902,6 +912,8 @@ int BotChat_HitNoKill(bot_state_t *bs) {
// char name[32], *weap;
// float rnd;
// aas_entityinfo_t entinfo;
Q_UNUSED(bs);
return qfalse; // FIXME
/*
if (bot_nochat.integer) return qfalse;

View File

@ -1341,6 +1341,8 @@ BotMatch_WhoIsTeamLeader
void BotMatch_WhoIsTeamLeader(bot_state_t *bs, bot_match_t *match) {
char netname[MAX_MESSAGE_SIZE];
Q_UNUSED(match);
if (!TeamPlayIsOn()) return;
ClientName(bs->client, netname, sizeof(netname));
@ -1452,6 +1454,8 @@ BotMatch_WhatIsMyCommand
void BotMatch_WhatIsMyCommand(bot_state_t *bs, bot_match_t *match) {
char netname[MAX_NETNAME];
Q_UNUSED(match);
ClientName(bs->client, netname, sizeof(netname));
if (Q_stricmp(netname, bs->teamleader) != 0) return;
bs->forceorders = qtrue;
@ -1754,6 +1758,8 @@ void BotMatch_EnterGame(bot_state_t *bs, bot_match_t *match) {
int client;
char netname[MAX_NETNAME];
Q_UNUSED(bs);
gi.BotMatchVariable(match, NETNAME, netname, sizeof(netname));
client = FindClientByName(netname);
if (client >= 0) {

View File

@ -263,6 +263,7 @@ EntityIsChatting
==================
*/
qboolean EntityIsChatting(aas_entityinfo_t *entinfo) {
Q_UNUSED(entinfo);
// BOTTODO
// if (entinfo->flags & EF_TALK) {
// return qtrue;
@ -277,6 +278,7 @@ EntityHasQuad
==================
*/
qboolean EntityHasQuad(aas_entityinfo_t *entinfo) {
Q_UNUSED(entinfo);
/* BOTTODO
if (entinfo->powerups & (1 << PW_QUAD)) {
return qtrue;
@ -292,6 +294,7 @@ EntityHasKamikze
==================
*/
qboolean EntityHasKamikaze(aas_entityinfo_t *entinfo) {
Q_UNUSED(entinfo);
/* FIXME
if (entinfo->flags & EF_KAMIKAZE) {
return qtrue;
@ -1158,6 +1161,7 @@ BotObeliskRetreatGoals
==================
*/
void BotObeliskRetreatGoals(bot_state_t *bs) {
Q_UNUSED(bs);
//nothing special
}
@ -2177,6 +2181,7 @@ BotSetTeleportTime
==================
*/
void BotSetTeleportTime(bot_state_t *bs) {
Q_UNUSED(bs);
/* FIXME
if ((bs->cur_ps.eFlags ^ bs->last_eFlags) & EF_TELEPORT_BIT) {
bs->teleport_time = FloatTime();
@ -2200,6 +2205,7 @@ BotIsObserver
==================
*/
qboolean BotIsObserver(bot_state_t *bs) {
Q_UNUSED(bs);
/* char buf[MAX_INFO_STRING];
if (bs->cur_ps.pm_type == PM_SPECTATOR) return qtrue;
strncpy(buf,gi.getConfigstring(CS_PLAYERS+bs->client), sizeof(buf));
@ -2213,6 +2219,7 @@ BotIntermission
==================
*/
qboolean BotIntermission(bot_state_t *bs) {
Q_UNUSED(bs);
//NOTE: we shouldn't be looking at the game code...
if (level.intermissiontime) return qtrue;
// return (bs->cur_ps.pm_type == PM_FREEZE || bs->cur_ps.pm_type == PM_INTERMISSION); // FIXME
@ -2490,6 +2497,7 @@ BotWantsToHelp
==================
*/
int BotWantsToHelp(bot_state_t *bs) {
Q_UNUSED(bs);
return qtrue;
}
@ -4187,6 +4195,8 @@ int BotTriggerMultipleActivateGoal(bot_state_t *bs, int bspent, bot_activategoal
vec3_t start, end, mins, maxs, angles;
vec3_t origin, goalorigin;
Q_UNUSED(bs);
activategoal->shoot = qfalse;
VectorClear(activategoal->target);
//create a bot goal towards the trigger
@ -4948,6 +4958,7 @@ BotCheckEvents
==================
*/
void BotCheckEvents(bot_state_t *bs, entityState_t *state) {
Q_UNUSED(state); Q_UNUSED(bs);
// BOTTODO -- hook in our event system somehow?
/*
int event;
@ -5385,6 +5396,8 @@ void BotDeathmatchAI(bot_state_t *bs, float thinktime) {
char userinfo[MAX_INFO_STRING];
int i;
Q_UNUSED(thinktime);
//if the bot has just been setup
if (bs->setupcount > 0) {
bs->setupcount--;

View File

@ -170,6 +170,8 @@ BotSetTeamMateTaskPreference
void BotSetTeamMateTaskPreference(bot_state_t *bs, int teammate, int preference) {
char teammatename[MAX_NETNAME];
Q_UNUSED(bs);
ctftaskpreferences[teammate].preference = preference;
ClientName(teammate, teammatename, sizeof(teammatename));
strcpy(ctftaskpreferences[teammate].name, teammatename);
@ -183,6 +185,8 @@ BotGetTeamMateTaskPreference
int BotGetTeamMateTaskPreference(bot_state_t *bs, int teammate) {
char teammatename[MAX_NETNAME];
Q_UNUSED(bs);
if (!ctftaskpreferences[teammate].preference) return 0;
ClientName(teammate, teammatename, sizeof(teammatename));
if (Q_stricmp(teammatename, ctftaskpreferences[teammate].name)) return 0;
@ -264,6 +268,7 @@ void BotSayTeamOrder(bot_state_t *bs, int toclient) {
#else
BotSayTeamOrderAlways(bs, toclient);
#endif
Q_UNUSED(toclient);
}
/*
@ -1902,6 +1907,7 @@ FindHumanTeamLeader
==================
*/
int FindHumanTeamLeader(bot_state_t *bs) {
Q_UNUSED(bs);
// int i;
// no human team leaders in ef2, 'cause we've got no voicechat commands
/*

View File

@ -54,7 +54,8 @@ BotVoiceChat_GetFlag
==================
*/
void BotVoiceChat_GetFlag(bot_state_t *bs, int client, int mode) {
//
Q_UNUSED(mode);
if (gametype == GT_CTF) {
if (!ctf_redflag.areanum || !ctf_blueflag.areanum)
return;
@ -154,6 +155,7 @@ BotVoiceChat_Defend
==================
*/
void BotVoiceChat_Defend(bot_state_t *bs, int client, int mode) {
Q_UNUSED(mode);
#ifdef MISSIONPACK
if ( gametype == GT_OBELISK || gametype == GT_HARVESTER) {
//
@ -216,6 +218,7 @@ BotVoiceChat_Patrol
==================
*/
void BotVoiceChat_Patrol(bot_state_t *bs, int client, int mode) {
Q_UNUSED(mode);
//
bs->decisionmaker = client;
//
@ -243,6 +246,8 @@ void BotVoiceChat_Camp(bot_state_t *bs, int client, int mode) {
aas_entityinfo_t entinfo;
char netname[MAX_NETNAME];
Q_UNUSED(mode);
//
bs->teamgoal.entitynum = -1;
BotEntityInfo(client, &entinfo);
@ -299,6 +304,8 @@ void BotVoiceChat_FollowMe(bot_state_t *bs, int client, int mode) {
aas_entityinfo_t entinfo;
char netname[MAX_NETNAME];
Q_UNUSED(mode);
bs->teamgoal.entitynum = -1;
BotEntityInfo(client, &entinfo);
//if info is valid (in PVS)
@ -351,6 +358,8 @@ BotVoiceChat_FollowFlagCarrier
void BotVoiceChat_FollowFlagCarrier(bot_state_t *bs, int client, int mode) {
int carrier;
Q_UNUSED(client);
carrier = BotTeamFlagCarrier(bs);
if (carrier >= 0)
BotVoiceChat_FollowMe(bs, carrier, mode);
@ -365,6 +374,8 @@ BotVoiceChat_ReturnFlag
==================
*/
void BotVoiceChat_ReturnFlag(bot_state_t *bs, int client, int mode) {
Q_UNUSED(mode);
//if not in CTF mode
if (
gametype != GT_CTF
@ -397,6 +408,8 @@ BotVoiceChat_StartLeader
==================
*/
void BotVoiceChat_StartLeader(bot_state_t *bs, int client, int mode) {
Q_UNUSED(mode);
ClientName(client, bs->teamleader, sizeof(bs->teamleader));
}
@ -408,6 +421,8 @@ BotVoiceChat_StopLeader
void BotVoiceChat_StopLeader(bot_state_t *bs, int client, int mode) {
char netname[MAX_MESSAGE_SIZE];
Q_UNUSED(mode);
if (!Q_stricmp(bs->teamleader, ClientName(client, netname, sizeof(netname)))) {
bs->teamleader[0] = '\0';
notleader[client] = qtrue;
@ -422,6 +437,9 @@ BotVoiceChat_WhoIsLeader
void BotVoiceChat_WhoIsLeader(bot_state_t *bs, int client, int mode) {
char netname[MAX_MESSAGE_SIZE];
Q_UNUSED(mode);
Q_UNUSED(client);
if (!TeamPlayIsOn()) return;
ClientName(bs->client, netname, sizeof(netname));
@ -442,6 +460,8 @@ void BotVoiceChat_WantOnDefense(bot_state_t *bs, int client, int mode) {
char netname[MAX_NETNAME];
int preference;
Q_UNUSED(mode);
preference = BotGetTeamMateTaskPreference(bs, client);
preference &= ~TEAMTP_ATTACKER;
preference |= TEAMTP_DEFENDER;
@ -463,6 +483,8 @@ void BotVoiceChat_WantOnOffense(bot_state_t *bs, int client, int mode) {
char netname[MAX_NETNAME];
int preference;
Q_UNUSED(mode);
preference = BotGetTeamMateTaskPreference(bs, client);
preference &= ~TEAMTP_DEFENDER;
preference |= TEAMTP_ATTACKER;
@ -476,6 +498,7 @@ void BotVoiceChat_WantOnOffense(bot_state_t *bs, int client, int mode) {
}
void BotVoiceChat_Dummy(bot_state_t *bs, int client, int mode) {
Q_UNUSED(bs); Q_UNUSED(client); Q_UNUSED(mode);
}
voiceCommand_t voiceCommands[] = {

View File

@ -460,7 +460,7 @@ Class::~Class()
#ifdef GAME_DLL
void Class::Archive( Archiver &arc )
void Class::Archive( Archiver & )
{
}

View File

@ -118,6 +118,7 @@ G_LoadArenasFromFile
===============
*/
static void G_LoadArenasFromFile( char *filename ) {
Q_UNUSED(filename);
return;
/* int len;
@ -326,6 +327,8 @@ int G_RemoveRandomBot( int team ) {
char netname[36];
gclient_t *cl;
Q_UNUSED(team);
for ( i=0 ; i< maxclients->integer ; i++ ) {
cl = game.clients + i;
// if ( cl->pers.connected != CON_CONNECTED ) {
@ -354,6 +357,8 @@ int G_CountHumanPlayers( int team ) {
int i, num;
gclient_t *cl;
Q_UNUSED(team);
num = 0;
for ( i=0 ; i< maxclients->integer ; i++ ) {
cl = game.clients + i;
@ -380,6 +385,8 @@ int G_CountBotPlayers( int team ) {
int i, n, num;
gclient_t *cl;
Q_UNUSED(team);
num = 0;
for ( i=0 ; i< maxclients->integer ; i++ ) {
cl = game.clients + i;

View File

@ -106,7 +106,7 @@ void GotoHelperNodeEX::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void GotoHelperNodeEX::AnimDone( Event *ev )
void GotoHelperNodeEX::AnimDone( Event * )
{
}
@ -139,7 +139,7 @@ void GotoHelperNodeEX::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t GotoHelperNodeEX::Evaluate( Actor &self )
BehaviorReturnCode_t GotoHelperNodeEX::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -206,7 +206,7 @@ BehaviorReturnCode_t GotoHelperNodeEX::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void GotoHelperNodeEX::End(Actor &self)
void GotoHelperNodeEX::End(Actor &)
{
}

View File

@ -96,7 +96,7 @@ void GotoHelperNodeNearestEnemy::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void GotoHelperNodeNearestEnemy::AnimDone( Event *ev )
void GotoHelperNodeNearestEnemy::AnimDone( Event * )
{
}
@ -129,7 +129,7 @@ void GotoHelperNodeNearestEnemy::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t GotoHelperNodeNearestEnemy::Evaluate( Actor &self )
BehaviorReturnCode_t GotoHelperNodeNearestEnemy::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -198,7 +198,7 @@ BehaviorReturnCode_t GotoHelperNodeNearestEnemy::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void GotoHelperNodeNearestEnemy::End(Actor &self)
void GotoHelperNodeNearestEnemy::End(Actor &)
{
}

View File

@ -124,7 +124,7 @@ void HealGroupMember::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void HealGroupMember::AnimDone( Event *ev )
void HealGroupMember::AnimDone( Event * )
{
}
@ -242,7 +242,7 @@ BehaviorReturnCode_t HealGroupMember::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void HealGroupMember::End(Actor &self)
void HealGroupMember::End(Actor &)
{
}
@ -442,7 +442,7 @@ void HealGroupMember::rotateToEntityFailed( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void HealGroupMember::setupAnimate( Actor &self )
void HealGroupMember::setupAnimate( Actor & )
{
/*
PostureStates_t pState = _currentPatient->movementSubsystem->getPostureState();
@ -524,7 +524,7 @@ void HealGroupMember::doAnimate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void HealGroupMember::animateFailed( Actor &self )
void HealGroupMember::animateFailed( Actor & )
{
str FailureReason;
FailureReason = "Animation Not Found\n";
@ -545,7 +545,7 @@ void HealGroupMember::animateFailed( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void HealGroupMember::treatedPatient( Actor &self , Entity *ent )
void HealGroupMember::treatedPatient( Actor & , Entity *ent )
{
triageEntry_t* checkEntry;
@ -571,7 +571,7 @@ void HealGroupMember::treatedPatient( Actor &self , Entity *ent )
//
// Returns: Actor*
//--------------------------------------------------------------
Actor* HealGroupMember::findHighestPriorityPatient( Actor &self )
Actor* HealGroupMember::findHighestPriorityPatient( Actor & )
{
triageEntry_t* checkEntry;
Actor *highestPriorityPatient;
@ -606,7 +606,7 @@ Actor* HealGroupMember::findHighestPriorityPatient( Actor &self )
//
// Returns: True or False
//--------------------------------------------------------------
bool HealGroupMember::allPatientsTreated( Actor &self )
bool HealGroupMember::allPatientsTreated( Actor & )
{
triageEntry_t* checkEntry;
@ -633,7 +633,7 @@ bool HealGroupMember::allPatientsTreated( Actor &self )
//
// Returns: True or False
//--------------------------------------------------------------
bool HealGroupMember::patientTreated( Actor &self , Entity *ent )
bool HealGroupMember::patientTreated( Actor & , Entity *ent )
{
triageEntry_t* checkEntry;

View File

@ -88,11 +88,11 @@ HoldPosition::~HoldPosition()
// Returns: None
//
//--------------------------------------------------------------
void HoldPosition::SetArgs( Event *ev )
void HoldPosition::SetArgs( Event * )
{
}
void HoldPosition::AnimDone( Event *ev )
void HoldPosition::AnimDone( Event * )
{
_animDone = true;
}
@ -127,7 +127,7 @@ void HoldPosition::Begin( Actor &self )
// Returns: BehaviorReturnCode_t
//
//--------------------------------------------------------------
BehaviorReturnCode_t HoldPosition::Evaluate( Actor &self )
BehaviorReturnCode_t HoldPosition::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -207,7 +207,7 @@ BehaviorReturnCode_t HoldPosition::Evaluate( Actor &self )
// Returns: None
//
//--------------------------------------------------------------
void HoldPosition::End(Actor &self)
void HoldPosition::End(Actor &)
{
_self->SetIgnoreWatchTarget( false );
}
@ -295,6 +295,7 @@ BehaviorReturnCode_t HoldPosition::evaluateStateHold()
void HoldPosition::failureStateHold( const str& failureReason )
{
Q_UNUSED(failureReason);
}
void HoldPosition:: setupStateTwitch()
@ -318,6 +319,7 @@ BehaviorReturnCode_t HoldPosition::evaluateStateTwitch()
void HoldPosition:: failureStateTwitch( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -356,4 +358,5 @@ BehaviorReturnCode_t HoldPosition::evaluateStateWeaponTwitch()
void HoldPosition:: failureStateWeaponTwitch( const str& failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -158,7 +158,7 @@ void EventVar::Archive( Archiver &arc )
#endif
const char *EventVar::GetToken( Event &ev )
const char *EventVar::GetToken( Event & )
{
if ( dirtyFlags & DIRTY_STRING )
{
@ -187,7 +187,7 @@ const char *EventVar::GetToken( Event &ev )
return stringValue.c_str();
}
const char *EventVar::GetString( Event &ev )
const char *EventVar::GetString( Event & )
{
if ( dirtyFlags & DIRTY_STRING )
{
@ -216,7 +216,7 @@ const char *EventVar::GetString( Event &ev )
return stringValue.c_str();
}
int EventVar::GetInteger( Event &ev )
int EventVar::GetInteger( Event & )
{
if ( dirtyFlags & DIRTY_INTEGER )
{
@ -241,7 +241,7 @@ int EventVar::GetInteger( Event &ev )
return intValue;
}
float EventVar::GetFloat( Event &ev )
float EventVar::GetFloat( Event & )
{
if ( dirtyFlags & DIRTY_FLOAT )
{
@ -267,7 +267,7 @@ float EventVar::GetFloat( Event &ev )
return floatValue;
}
Vector EventVar::GetVector( Event &ev )
Vector EventVar::GetVector( Event & )
{
if ( dirtyFlags & DIRTY_VECTOR )
{
@ -542,7 +542,7 @@ qboolean IsNumeric( const char *str )
#endif
qboolean EventVar::IsVector( Event &ev )
qboolean EventVar::IsVector( Event & )
{
switch( type )
{
@ -561,7 +561,7 @@ qboolean EventVar::IsVector( Event &ev )
return false;
}
qboolean EventVar::IsNumeric( Event &ev )
qboolean EventVar::IsNumeric( Event & )
{
switch( type )
{
@ -2322,12 +2322,12 @@ CLASS_DECLARATION( Class, Listener, NULL )
{ NULL, NULL }
};
void Listener::Remove( Event *e )
void Listener::Remove( Event * )
{
delete this;
}
void Listener::ScriptRemove( Event *e )
void Listener::ScriptRemove( Event * )
{
// Forces the remove to be done at a safe time
PostEvent( EV_Remove, 0.0f );

View File

@ -429,6 +429,8 @@ void AwardSystem::awardTeamAward( AfterMatchTeamAwardType teamAward, const char
void AwardSystem::playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer )
{
Q_UNUSED(eventName);
// See if we care about this player notification
if ( stricmp( eventName, "flag-captured" ) == 0 )
@ -449,9 +451,10 @@ void AwardSystem::playerKilled( Player *killedPlayer, Player *attackingPlayer, E
{
str weaponName;
int itemIndex;
MultiplayerPlayerAwardData *attackerAwardData;
Q_UNUSED(inflictor);
// Modify the killed player's stats
_playerAwardData[ killedPlayer->entnum ]._killStreak = 0;
@ -664,6 +667,9 @@ void AwardSystem::playerFired( Player *attackingPlayer )
void AwardSystem::playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(damage);
if ( !attackingPlayer )
return;

View File

@ -151,7 +151,7 @@ public:
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath );
virtual void addPlayer( Player *player );
virtual void removePlayer( Player *player );
virtual void update( float frameTime ) { Q_UNUSED(frameTime) };
virtual void update( float frameTime ) { Q_UNUSED(frameTime); }
virtual int getStat( Player *player, int statNum, int value );
virtual int getIcon( Player *player, int statNum, int value );

View File

@ -1361,6 +1361,9 @@ void MultiplayerManager::playerFired( Player *attackingPlayer )
float MultiplayerManager::getModifiedKnockback( Player *damagedPlayer, Player *attackingPlayer, float knockback )
{
Q_UNUSED(attackingPlayer);
Q_UNUSED(damagedPlayer);
if ( !_inMultiplayerGame )
return knockback;

View File

@ -245,6 +245,8 @@ Team* MultiplayerModeBase::getPlayersTeam( const Player *player )
void MultiplayerModeBase::update( float frameTime )
{
Q_UNUSED(frameTime);
if ( !_gameStarted )
{
if ( shouldStartMatch() )
@ -815,11 +817,18 @@ void MultiplayerModeBase::RemovePlayer( Player *player )
float MultiplayerModeBase::playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(attackingPlayer);
Q_UNUSED(damagedPlayer);
return damage;
}
void MultiplayerModeBase::playerTookDamage( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(damage);
if ( attackingPlayer && ( attackingPlayer != damagedPlayer ) )
{
// Play the hurt someone sound
@ -894,6 +903,9 @@ bool MultiplayerModeBase::parseConfigToken( const char *key, Script *buffer )
int MultiplayerModeBase::getIcon( Player *player, int statNum, int value )
{
Q_UNUSED(statNum);
Q_UNUSED(player);
/* if ( statNum == STAT_MP_TEAMHUD_ICON && multiplayerManager.isPlayerSpectator( player ) )
return _spectatorIconIndex;
else */
@ -971,6 +983,8 @@ bool MultiplayerModeBase::shouldStartMatch( void )
int MultiplayerModeBase::getStat( Player *player, int statNum, int value )
{
Q_UNUSED(player);
if ( statNum == STAT_MP_STATE )
{
int numPlayers;

View File

@ -134,9 +134,9 @@ class MultiplayerModeBase : public Class
virtual void init( int maxPlayers );
virtual void initItems( void );
virtual void start( void ) {};
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item) return false; }
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item); return false; }
virtual bool shouldKeepNormalItem( Item *item );
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item) };
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item); };
virtual void update( float frameTime );
virtual void matchOver( void ) {};
@ -147,7 +147,7 @@ class MultiplayerModeBase : public Class
int findPlayer( const Player *player );
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum) Q_UNUSED(itemName) return true; }
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum); Q_UNUSED(itemName); return true; }
// Queries
virtual bool isEndOfMatch( void );
@ -166,14 +166,14 @@ class MultiplayerModeBase : public Class
int getKills( Player *player );
int getDeaths( Player *player );
Team* getPlayersTeam( const Player *player );
virtual int getTeamPoints( Player *player ) { Q_UNUSED(player) return 0; }
virtual int getTeamPoints( const str & teamName ) { Q_UNUSED(teamName) return 0; }
virtual void addTeamPoints( const str & teamName, int points ) { Q_UNUSED(teamName) Q_UNUSED(points) return; }
virtual int getTeamPoints( Player *player ) { Q_UNUSED(player); return 0; }
virtual int getTeamPoints( const str & teamName ) { Q_UNUSED(teamName); return 0; }
virtual void addTeamPoints( const str & teamName, int points ) { Q_UNUSED(teamName); Q_UNUSED(points); return; }
virtual int getStat( Player *player, int statNum, int value );
virtual int getIcon( Player *player, int statNum, int value );
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player) Q_UNUSED(index) return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player) return 0; }
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player); Q_UNUSED(index); return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player); return 0; }
virtual Player * getLastKilledByPlayer( Player *player, int *meansOfDeath );
virtual Player * getLastKillerOfPlayer( Player *player, int *meansOfDeath );
@ -202,34 +202,34 @@ class MultiplayerModeBase : public Class
virtual bool canJoinTeam( Player *player, const str &teamName );
virtual void joinTeam( Player *player, const str &teamName );
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(item_name) return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(itemName) };
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player); Q_UNUSED(itemType); Q_UNUSED(item_name); return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player); Q_UNUSED(itemType); Q_UNUSED(itemName); };
virtual void applySpeedModifiers( Player *player, int *moveSpeed );
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player) Q_UNUSED(jumpSpeed) };
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player) Q_UNUSED(airAcceleration) };
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player); Q_UNUSED(jumpSpeed); };
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player); Q_UNUSED(airAcceleration); };
virtual void setupMultiplayerUI( Player *player );
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath );
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath );
virtual void playerTookDamage( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath );
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer) };
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer); };
virtual void obituary( Player *killedPlayer, Player *attackingPlayer, int meansOfDeath );
virtual void playerDead( Player *player );
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity) Q_UNUSED(item) };
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player); Q_UNUSED(item); };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player); Q_UNUSED(item); };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item); Q_UNUSED(attackingPlayer); Q_UNUSED(meansOfDeath); return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity); Q_UNUSED(item); };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer) Q_UNUSED(usingPlayer) Q_UNUSED(equipment) };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer); Q_UNUSED(usingPlayer); Q_UNUSED(equipment); };
virtual void score( const Player *player );
virtual void respawnPlayer( Player *player ) { Q_UNUSED(player) };
virtual void respawnPlayer( Player *player ) { Q_UNUSED(player); };
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName) Q_UNUSED(eventItemName) Q_UNUSED(eventPlayer) };
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName); Q_UNUSED(eventItemName); Q_UNUSED(eventPlayer); };
// Utility functions
void AddStartingWeapon(const str& weaponViewmodel);
@ -245,21 +245,21 @@ class MultiplayerModeBase : public Class
void endMatch( void );
void restartMatch( void );
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule) return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemName) return false; }
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule); return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player); Q_UNUSED(itemName); return false; }
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player) Q_UNUSED(command) Q_UNUSED(parm) };
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player); Q_UNUSED(command); Q_UNUSED(parm); };
virtual void teamPointsChanged( Team *team, int oldPoints, int newPoints ) { Q_UNUSED(team) Q_UNUSED(oldPoints) Q_UNUSED(newPoints) };
virtual void teamPointsChanged( Team *team, int oldPoints, int newPoints ) { Q_UNUSED(team); Q_UNUSED(oldPoints); Q_UNUSED(newPoints); };
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule) Q_UNUSED(player) return defaultValue; }
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule); Q_UNUSED(player); return defaultValue; }
virtual int getHighestPoints( void );
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player) Q_UNUSED(modelToUse) return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player) return modelName; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player); Q_UNUSED(modelToUse); return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player); return modelName; }
virtual void playerChangedModel( Player *player ) {};
virtual void playerChangedModel( Player * ) {};
virtual bool skipWeaponReloads( void ) { return false; }
};

View File

@ -198,6 +198,8 @@ int ModeDeathmatch::getHighestPoints( int entnum )
bool ModeDeathmatch::checkRule( const char *rule, bool defaultValue, Player *player )
{
Q_UNUSED(player);
if ( stricmp( rule, "usingIndividualScore" ) == 0 )
return true;
else

View File

@ -37,6 +37,7 @@ ModifierInstantKill::ModifierInstantKill()
void ModifierInstantKill::init( int maxPlayers )
{
Q_UNUSED(maxPlayers);
multiplayerManager.cacheMultiplayerFiles( "mp_instantKill" );
}
@ -44,6 +45,9 @@ float ModifierInstantKill::playerDamaged( Player *damagedPlayer, Player *attacki
{
float realDamage = 0.0f;
Q_UNUSED(attackingPlayer);
Q_UNUSED(damagedPlayer);
if ( damage > 0.0f )
{
switch( meansOfDeath )
@ -67,6 +71,8 @@ float ModifierInstantKill::playerDamaged( Player *damagedPlayer, Player *attacki
bool ModifierInstantKill::canGivePlayerItem( int entnum, const str &itemName )
{
Q_UNUSED(entnum);
if ( strstr( itemName.c_str(), "phaser.tik" ) )
return false;
else if ( strstr( itemName.c_str(), "batleth.tik" ) )
@ -79,6 +85,8 @@ bool ModifierInstantKill::canGivePlayerItem( int entnum, const str &itemName )
bool ModifierInstantKill::checkRule( const char *rule, bool defaultValue, Player *player )
{
Q_UNUSED(player);
if ( stricmp( rule, "dropWeapons" ) == 0 )
return false;
else
@ -118,6 +126,8 @@ void ModifierInstantKill::update( float frameTime )
int i;
Player *player;
Q_UNUSED(frameTime);
if ( _lastRegenTime + _regenTime < multiplayerManager.getTime() )
{
for ( i = 0 ; i < multiplayerManager.getMaxPlayers() ; i++ )
@ -202,6 +212,9 @@ void ModifierDestruction::playerKilled( Player *killedPlayer, Player *attackingP
str printString;
bool objectGuarded;
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
if ( !attackingPlayer || ( killedPlayer == attackingPlayer ) )
return;
@ -279,6 +292,8 @@ int ModifierDestruction::getStat( Player *player, int statNum, int value )
{
float floatRealValue;
Q_UNUSED(player);
if ( statNum == STAT_MP_GENERIC1 )
{
// Return the health of the red team's object
@ -366,6 +381,8 @@ float ModifierDestruction::itemDamaged( MultiplayerItem *item, Player *attacking
{
Team *team;
Q_UNUSED(meansOfDeath);
team = multiplayerManager.getPlayersTeam( attackingPlayer );
if ( !team )
@ -563,6 +580,7 @@ void ModifierDestruction::update( float frameTime )
int currentStage;
int lastStage;
Q_UNUSED(frameTime);
if ( _redDestructionObject )
{
@ -721,6 +739,8 @@ bool ModifierDestruction::checkRule( const char *rule, bool defaultValue, Player
{
// We want team spawnpoints
Q_UNUSED(player);
if ( stricmp( rule, "spawnpoints-team" ) == 0 )
return true;
else if ( stricmp( rule, "keepflags" ) == 0 )
@ -759,6 +779,8 @@ bool ModifierOneFlag::checkRule( const char *rule, bool defaultValue, Player *pl
{
// Check to see if we care about this rule
Q_UNUSED(player);
if ( strnicmp( rule, "flagscore-", sizeof( "flagscore-" ) - 1 ) == 0 )
{
// See if this flag touch should generate a flag score
@ -892,6 +914,10 @@ void ModifierElimination::playerKilled( Player *killedPlayer, Player *attackingP
{
Team *team;
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
Q_UNUSED(attackingPlayer);
if ( !killedPlayer )
return;
@ -1077,6 +1103,7 @@ void ModifierElimination::update( float frameTime )
gentity_t *edict;
int i;
Q_UNUSED(frameTime);
if ( _matchOver )
return;
@ -1349,6 +1376,8 @@ bool ModifierDiffusion::checkRule( const char *rule, bool defaultValue, Player *
{
// We want team spawnpoints
Q_UNUSED(player);
if ( stricmp( rule, "spawnpoints-team" ) == 0 )
{
return true;
@ -1743,6 +1772,8 @@ void ModifierDiffusion::attachBomb( Player *player )
int ModifierDiffusion::getStat( Player *player, int statNum, int value )
{
Q_UNUSED(player);
if ( statNum == STAT_MP_GENERIC1 )
{
if ( _redBombPlace._armed )
@ -1832,6 +1863,10 @@ void ModifierDiffusion::playerKilled( Player *killedPlayer, Player *attackingPla
{
bool victimWasBomber;
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
if ( killedPlayer->entnum == _bomber )
{
dropBomb( killedPlayer );
@ -1998,6 +2033,8 @@ bool ModifierDiffusion::withinGuardDistance( const Vector &origin1, const Vector
void ModifierDiffusion::playerCommand( Player *player, const char *command, const char *parm )
{
Q_UNUSED(parm);
if ( stricmp( command, "dropItem" ) == 0 )
{
if ( player == getBomber() )
@ -3090,6 +3127,9 @@ void ModifierSpecialties::removePlayer( Player *player )
void ModifierSpecialties::playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
Q_UNUSED(attackingPlayer);
putItemBack( killedPlayer );
}
@ -3133,6 +3173,8 @@ bool ModifierSpecialties::canPickup( Player *player, MultiplayerItemType itemTyp
{
// The infiltrator can't pickup the speed powerup
Q_UNUSED(item_name);
if ( itemType == MP_ITEM_TYPE_ARMOR )
{
if ( _playerSpecialtyData[ player->entnum ]._specialty == SPECIALTY_INFILTRATOR )
@ -3377,6 +3419,7 @@ ModifierControlPoints::~ModifierControlPoints()
void ModifierControlPoints::init( int maxPlayers )
{
Q_UNUSED(maxPlayers);
multiplayerManager.cacheMultiplayerFiles( "mp_controlPoints" );
}
@ -3387,11 +3430,14 @@ void ModifierControlPoints::addPlayer( Player *player )
str ModifierControlPoints::getSpawnPointType( Player *player )
{
Q_UNUSED(player);
return "control";
}
bool ModifierControlPoints::checkRule( const char *rule, bool defaultValue, Player *player )
{
Q_UNUSED(player);
if ( stricmp( rule, "spawnpoints-special" ) == 0 )
return true;
else
@ -3532,6 +3578,8 @@ void ModifierControlPoints::update( float frameTime )
int i;
ControlPointData *controlPoint;
Q_UNUSED(frameTime);
// Loop through all control points
for ( i = 1 ; i <= _controlPoints.NumObjects() ; i++ )
@ -3607,6 +3655,9 @@ void ModifierControlPoints::playerKilled( Player *killedPlayer, Player *attackin
str printString;
bool controlPointGuarded;
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
if ( !attackingPlayer || ( killedPlayer == attackingPlayer ) )
return;
@ -3700,6 +3751,8 @@ int ModifierControlPoints::getStat( Player *player, int statNum, int value )
int i;
ControlPointType controlPointType;
Q_UNUSED(player);
// Figure out which control point we are referring to (if any) and the set of icons to use
@ -3798,6 +3851,8 @@ void ModifierAutoHandicap::addPlayer( Player *player )
float ModifierAutoHandicap::playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
if ( damagedPlayer == attackingPlayer )
return damage;
@ -3809,6 +3864,9 @@ float ModifierAutoHandicap::playerDamaged( Player *damagedPlayer, Player *attack
void ModifierAutoHandicap::playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
if ( killedPlayer == attackingPlayer || !attackingPlayer )
return;
@ -3837,6 +3895,7 @@ ModifierActionHero::ModifierActionHero()
void ModifierActionHero::init( int maxPlayers )
{
Q_UNUSED(maxPlayers);
multiplayerManager.cacheMultiplayerFiles( "mp_actionhero" );
}
@ -3882,6 +3941,9 @@ void ModifierActionHero::update( float frameTime )
void ModifierActionHero::playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath )
{
Q_UNUSED(meansOfDeath);
Q_UNUSED(inflictor);
// Make sure everything is ok
if ( !killedPlayer )
@ -4010,6 +4072,8 @@ ModifierPointsPerWeapon::~ModifierPointsPerWeapon()
void ModifierPointsPerWeapon::init( int maxPlayers )
{
Q_UNUSED(maxPlayers);
// Read in all of the projectile/weapon points data
readMultiplayerConfig( "global/mp_PointsPerWeapon.cfg" );
@ -4099,6 +4163,8 @@ int ModifierPointsPerWeapon::getPointsForKill( Player *killedPlayer, Player *att
PointsPerWeaponData *pointsPerWeaponData;
int i;
Q_UNUSED(meansOfDeath);
// Make sure everything is ok
if ( killedPlayer == attackingPlayer )

View File

@ -34,57 +34,57 @@ public:
MultiplayerModifier() {};
virtual ~MultiplayerModifier() {};
virtual void init( int maxPlayers ) { Q_UNUSED(maxPlayers) };
virtual void init( int maxPlayers ) { Q_UNUSED(maxPlayers); };
virtual void initItems( void ) {};
virtual void start( void ) {};
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item) return false; }
virtual bool shouldKeepNormalItem( Item *item ) { Q_UNUSED(item) return true; }
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item) };
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule) Q_UNUSED(player) return defaultValue; }
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule) return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemName) return false; }
virtual bool shouldKeepItem( MultiplayerItem *item ) { Q_UNUSED(item); return false; }
virtual bool shouldKeepNormalItem( Item *item ) { Q_UNUSED(item); return true; }
virtual void itemKept( MultiplayerItem *item ) { Q_UNUSED(item); };
virtual bool checkRule( const char *rule, bool defaultValue, Player *player = NULL ) { Q_UNUSED(rule); Q_UNUSED(player); return defaultValue; }
virtual bool checkGameType( const char *rule ) { Q_UNUSED(rule); return false; }
virtual bool doesPlayerHaveItem( Player *player, const char *itemName ) { Q_UNUSED(player); Q_UNUSED(itemName); return false; }
virtual int getStat( Player *player, int statNum, int value ) { Q_UNUSED(player) Q_UNUSED(statNum) return value; }
virtual int getIcon( Player *player, int statNum, int value ) { Q_UNUSED(player) Q_UNUSED(statNum) return value; }
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player) Q_UNUSED(index) return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player) return 0; }
virtual int getStat( Player *player, int statNum, int value ) { Q_UNUSED(player); Q_UNUSED(statNum); return value; }
virtual int getIcon( Player *player, int statNum, int value ) { Q_UNUSED(player); Q_UNUSED(statNum); return value; }
virtual int getScoreIcon( Player *player, int index, int value ) { Q_UNUSED(player); Q_UNUSED(index); return value; }
virtual int getInfoIcon( Player *player ) { Q_UNUSED(player); return 0; }
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(damagedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; };
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer) };
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath ) { Q_UNUSED(killedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(inflictor) Q_UNUSED(meansOfDeath) };
virtual float playerDamaged( Player *damagedPlayer, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(damagedPlayer); Q_UNUSED(attackingPlayer); Q_UNUSED(meansOfDeath); return damage; };
virtual void playerFired( Player *attackingPlayer ) { Q_UNUSED(attackingPlayer); };
virtual void playerKilled( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath ) { Q_UNUSED(killedPlayer); Q_UNUSED(attackingPlayer); Q_UNUSED(inflictor); Q_UNUSED(meansOfDeath); };
virtual void playerSpawned( Player * ) {};
virtual void matchOver( void ) {};
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player) Q_UNUSED(item) };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item) Q_UNUSED(attackingPlayer) Q_UNUSED(meansOfDeath) return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity) Q_UNUSED(item) };
virtual void itemTouched( Player *player, MultiplayerItem *item ) { Q_UNUSED(player); Q_UNUSED(item); };
virtual void itemDestroyed( Player *player, MultiplayerItem *item ) { Q_UNUSED(player); Q_UNUSED(item); };
virtual float itemDamaged( MultiplayerItem *item, Player *attackingPlayer, float damage, int meansOfDeath ) { Q_UNUSED(item); Q_UNUSED(attackingPlayer); Q_UNUSED(meansOfDeath); return damage; }
virtual void itemUsed( Entity *entity, MultiplayerItem *item ) { Q_UNUSED(entity); Q_UNUSED(item); };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer) Q_UNUSED(usingPlayer) Q_UNUSED(equipment) };
virtual void playerUsed( Player *usedPlayer, Player *usingPlayer, Equipment *equipment ) { Q_UNUSED(usedPlayer); Q_UNUSED(usingPlayer); Q_UNUSED(equipment); };
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum) Q_UNUSED(itemName) return true; }
virtual bool canGivePlayerItem( int entnum, const str &itemName ) { Q_UNUSED(entnum); Q_UNUSED(itemName); return true; }
virtual void addPlayer( Player * ) {};
virtual void removePlayer( Player * ) {};
virtual void joinedTeam( Player *player, const str &teamName ) { Q_UNUSED(player) Q_UNUSED(teamName) };
virtual void joinedTeam( Player *player, const str &teamName ) { Q_UNUSED(player); Q_UNUSED(teamName); }
virtual void applySpeedModifiers( Player *player, int *moveSpeed ) { Q_UNUSED(player) Q_UNUSED(moveSpeed) };
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player) Q_UNUSED(jumpSpeed) };
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player) Q_UNUSED(airAcceleration) };
virtual void applySpeedModifiers( Player *player, int *moveSpeed ) { Q_UNUSED(player); Q_UNUSED(moveSpeed); }
virtual void applyJumpModifiers( Player *player, int *jumpSpeed ) { Q_UNUSED(player); Q_UNUSED(jumpSpeed); }
virtual void applyAirAccelerationModifiers( Player *player, int *airAcceleration ) { Q_UNUSED(player); Q_UNUSED(airAcceleration); }
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(item_name) return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player) Q_UNUSED(itemType) Q_UNUSED(itemName) };
virtual bool canPickup( Player *player, MultiplayerItemType itemType, const char *item_name ) { Q_UNUSED(player); Q_UNUSED(itemType); Q_UNUSED(item_name); return true; }
virtual void pickedupItem( Player *player, MultiplayerItemType itemType, const char *itemName ) { Q_UNUSED(player); Q_UNUSED(itemType); Q_UNUSED(itemName); }
virtual void update( float frameTime ) { Q_UNUSED(frameTime) };
virtual void update( float frameTime ) { Q_UNUSED(frameTime); }
virtual int getPointsForKill( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath, int points ) { Q_UNUSED(killedPlayer) Q_UNUSED(attackingPlayer) Q_UNUSED(inflictor) Q_UNUSED(meansOfDeath) return points; }
virtual int getPointsForKill( Player *killedPlayer, Player *attackingPlayer, Entity *inflictor, int meansOfDeath, int points ) { Q_UNUSED(killedPlayer); Q_UNUSED(attackingPlayer); Q_UNUSED(inflictor); Q_UNUSED(meansOfDeath); return points; }
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName) Q_UNUSED(eventItemName) Q_UNUSED(eventPlayer) };
virtual void playerEventNotification( const char *eventName, const char *eventItemName, Player *eventPlayer ) { Q_UNUSED(eventName); Q_UNUSED(eventItemName); Q_UNUSED(eventPlayer); }
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player) Q_UNUSED(command) Q_UNUSED(parm) };
virtual void playerCommand( Player *player, const char *command, const char *parm ) { Q_UNUSED(player); Q_UNUSED(command); Q_UNUSED(parm); }
virtual void matchStarted( void ) {};
virtual void matchStarting( void ) {};
@ -94,8 +94,8 @@ public:
virtual str getSpawnPointType( Player * ) { return ""; }
virtual float getSpawnPointPriority( Player * ) { return 0.0f; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player) Q_UNUSED(modelToUse) return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player) return modelName; }
virtual bool isValidPlayerModel( Player *player, str modelToUse, bool defaultValue ) { Q_UNUSED(player); Q_UNUSED(modelToUse); return defaultValue; }
virtual str getDefaultPlayerModel( Player *player, str modelName ) { Q_UNUSED(player); return modelName; }
virtual void playerChangedModel( Player * ) {};
virtual bool skipWeaponReloads( void ) { return false; }

View File

@ -135,6 +135,8 @@ void Team::addPoints( Player *killer, int points )
{
int oldPoints;
Q_UNUSED(killer);
/* if ( killer && !_playerList.ObjectInList(killer))
{
assert( !"Player not in list" );

View File

@ -94,7 +94,7 @@ void Patrol::SetArgs ( Event *ev)
//
// Returns: None
//--------------------------------------------------------------
void Patrol::AnimDone( Event *ev )
void Patrol::AnimDone( Event * )
{
if ( _state == PATROL_WAITING_AT_NODE_FOR_ANIM )
{
@ -219,7 +219,7 @@ BehaviorReturnCode_t Patrol::Evaluate ( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::End ( Actor &self )
void Patrol::End ( Actor & )
{
}
@ -235,7 +235,7 @@ void Patrol::End ( Actor &self )
//
// Returns: true or false
//--------------------------------------------------------------
bool Patrol::_setupFindClosestPatrolNode( Actor &self )
bool Patrol::_setupFindClosestPatrolNode( Actor & )
{
_node = NULL;
return true;
@ -253,7 +253,7 @@ bool Patrol::_setupFindClosestPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupFindClosestPatrolNodeFailed( Actor &self )
void Patrol::_setupFindClosestPatrolNodeFailed( Actor & )
{
_state = PATROL_FAILED;
}
@ -333,7 +333,7 @@ void Patrol::_findClosestPatrolNode( Actor &self )
//
// Returns:
//--------------------------------------------------------------
void Patrol::_findClosestPatrolNodeFailed( Actor &self )
void Patrol::_findClosestPatrolNodeFailed( Actor & )
{
SetFailureReason( "Unable to find a patrol node within 512.0 units" );
_state = PATROL_FAILED;
@ -384,7 +384,7 @@ bool Patrol::_setupMovingToPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupMovingToPatrolNodeFailed( Actor &self )
void Patrol::_setupMovingToPatrolNodeFailed( Actor & )
{
_state = PATROL_FAILED;
}
@ -444,7 +444,7 @@ void Patrol::_moveToPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_moveToPatrolNodeFailed( Actor &self )
void Patrol::_moveToPatrolNodeFailed( Actor & )
{
_moveFailures++;
@ -473,7 +473,7 @@ void Patrol::_moveToPatrolNodeFailed( Actor &self )
//
// Returns: true or false
//--------------------------------------------------------------
bool Patrol::_setupAtPatrolNode( Actor &self )
bool Patrol::_setupAtPatrolNode( Actor & )
{
//self.SetAnim( "walk" );
return true;
@ -490,7 +490,7 @@ bool Patrol::_setupAtPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupAtPatrolNodeFailed( Actor &self )
void Patrol::_setupAtPatrolNodeFailed( Actor & )
{
_state = PATROL_FAILED;
}
@ -570,7 +570,7 @@ void Patrol::_atPatrolNode( Actor &self )
//
// Returns: true or false
//--------------------------------------------------------------
bool Patrol::_setupWaitingAtPatrolNode( Actor &self )
bool Patrol::_setupWaitingAtPatrolNode( Actor & )
{
return true;
}
@ -587,7 +587,7 @@ bool Patrol::_setupWaitingAtPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupWaitingAtPatrolNodeFailed(Actor &self )
void Patrol::_setupWaitingAtPatrolNodeFailed(Actor & )
{
_state = PATROL_FAILED;
}
@ -644,7 +644,7 @@ bool Patrol::_setupWaitingAtPatrolNodeForAnim( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupWaitingAtPatrolNodeForAnimFailed( Actor &self )
void Patrol::_setupWaitingAtPatrolNodeForAnimFailed( Actor & )
{
_state = PATROL_FAILED;
}
@ -661,7 +661,7 @@ void Patrol::_setupWaitingAtPatrolNodeForAnimFailed( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_waitAtPatrolNodeForAnim( Actor &self )
void Patrol::_waitAtPatrolNodeForAnim( Actor & )
{
// Transition is handled by the AnimDone Event
}
@ -678,7 +678,7 @@ void Patrol::_waitAtPatrolNodeForAnim( Actor &self )
//
// Returns: true or false
//--------------------------------------------------------------
bool Patrol::_setupFindNextPatrolNode( Actor &self )
bool Patrol::_setupFindNextPatrolNode( Actor & )
{
return true;
}
@ -695,7 +695,7 @@ bool Patrol::_setupFindNextPatrolNode( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupFindNextPatrolNodeFailed( Actor &self )
void Patrol::_setupFindNextPatrolNodeFailed( Actor & )
{
SetFailureReason( "Unable to find the next Node in the patrol path" );
_state = PATROL_FAILED;
@ -751,7 +751,7 @@ void Patrol::_findNextPatrolNode( Actor &self )
//
// Returns: true or false
//--------------------------------------------------------------
bool Patrol::_setupHold( Actor &self )
bool Patrol::_setupHold( Actor & )
{
_nextMoveAttempt = level.time + 0.5f + G_Random();
return true;
@ -769,7 +769,7 @@ bool Patrol::_setupHold( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Patrol::_setupHoldFailed( Actor &self )
void Patrol::_setupHoldFailed( Actor & )
{
_state = PATROL_FAILED;
}

View File

@ -28,58 +28,58 @@ class HoldableItem;
class PowerupBase : public Item
{
protected:
protected:
Sentient *_owner;
str _modelName;
Sentient *_owner;
str _modelName;
str _modelToAttachOnUse;
str _modelToAttachOnUseTag;
float _modelToAttachOnUseRemoveTime;
str _modelToSpawn;
str _shaderToDisplayOnUse;
str _modelToAttachOnUse;
str _modelToAttachOnUseTag;
float _modelToAttachOnUseRemoveTime;
str _modelToSpawn;
str _shaderToDisplayOnUse;
void init( const str &modelname, Sentient *owner );
void init( const str &modelname, Sentient *owner );
public:
CLASS_PROTOTYPE( PowerupBase );
PowerupBase();
virtual ~PowerupBase() {}
public:
CLASS_PROTOTYPE( PowerupBase );
void realNameEvent( Event *ev );
virtual void amountEvent( Event *ev );
PowerupBase();
virtual ~PowerupBase() {}
virtual void update( float frameTime ) { specificUpdate( frameTime ); }
virtual void specificUpdate( float frameTime ) {};
void realNameEvent( Event *ev );
virtual void amountEvent( Event *ev );
virtual float getMoveMultiplier( void ) { return 1.0f; };
virtual float getDamageDone( float damage, int meansOfDeath ) { return damage; };
virtual float getDamageTaken( Entity *attacker, float damage, int meansOfDeath ) { return damage; };
virtual void update( float frameTime ) { specificUpdate( frameTime ); }
virtual void specificUpdate( float frameTime ) { Q_UNUSED(frameTime); }
virtual meansOfDeath_t changetMeansOfDeath( meansOfDeath_t meansOfDeath ) { return meansOfDeath; };
virtual float getMoveMultiplier( void ) { return 1.0f; };
virtual float getDamageDone( float damage, int meansOfDeath ) { Q_UNUSED(meansOfDeath); return damage; }
virtual float getDamageTaken( Entity *attacker, float damage, int meansOfDeath ) { Q_UNUSED(attacker); Q_UNUSED(meansOfDeath); return damage; }
virtual void spawn( const Vector &origin ) {};
virtual meansOfDeath_t changetMeansOfDeath( meansOfDeath_t meansOfDeath ) { return meansOfDeath; }
/* virtual */ Item * ItemPickup( Entity *other, qboolean add_to_inventory, qboolean );
virtual void spawn( const Vector &origin ) { Q_UNUSED(origin); }
virtual void givePlayerItem( Player *player ) {};
/* virtual */ Item * ItemPickup( Entity *other, qboolean add_to_inventory, qboolean );
/* virtual */ float RespawnTime( void );
virtual void givePlayerItem( Player * ) {};
void setModelToAttachOnUse( Event *ev );
void setModelToSpawnOnUse( Event *ev );
void setShaderToDisplayOnUse( Event *ev );
/* virtual */ float RespawnTime( void );
void getModelToAttachOnUse( str &modelName, str &tagName, float &modelRemoveTime );
void getShaderToDisplayOnUse( str &modelName );
void setModelToAttachOnUse( Event *ev );
void setModelToSpawnOnUse( Event *ev );
void setShaderToDisplayOnUse( Event *ev );
virtual bool canDrop( void ) { return true; }
void getModelToAttachOnUse( str &modelName, str &tagName, float &modelRemoveTime );
void getShaderToDisplayOnUse( str &modelName );
virtual bool canOwnerRegenerate( void ) { return true; }
virtual bool canDrop( void ) { return true; }
/* virtual */ void Archive( Archiver &arc );
virtual bool canOwnerRegenerate( void ) { return true; }
/* virtual */ void Archive( Archiver &arc );
};
inline void PowerupBase::Archive( Archiver &arc )
@ -96,36 +96,36 @@ inline void PowerupBase::Archive( Archiver &arc )
class Powerup : public PowerupBase
{
protected:
protected:
float _timeLeft;
float _timeLeft;
public:
CLASS_PROTOTYPE( Powerup );
public:
CLASS_PROTOTYPE( Powerup );
Powerup();
virtual ~Powerup() {}
Powerup();
virtual ~Powerup() {}
/* virtual */ void amountEvent( Event *ev );
/* virtual */ void amountEvent( Event *ev );
float getTimeLeft( void ) const { return _timeLeft; };
float getTimeLeft( void ) const { return _timeLeft; };
/* virtual */ void update( float frameTime );
/* virtual */ void update( float frameTime );
/* virtual */ void spawn( const Vector &origin );
/* virtual */ void spawn( const Vector &origin );
/* virtual */ void givePlayerItem( Player *player );
/* virtual */ void givePlayerItem( Player *player );
static Powerup * CreatePowerup( const str &className, const str &modelName, Sentient *sentient );
static Powerup * CreatePowerup( const str &className, const str &modelName, Sentient *sentient );
/* virtual */ void cacheStrings( void );
/* virtual */ void cacheStrings( void );
float getTimeLeft( void ) { return _timeLeft; }
void setTimeLeft( float timeLeft ) { _timeLeft = timeLeft; }
float getTimeLeft( void ) { return _timeLeft; }
void setTimeLeft( float timeLeft ) { _timeLeft = timeLeft; }
virtual bool canStack( void ) { return true; }
virtual bool canStack( void ) { return true; }
/* virtual */ void Archive( Archiver &arc );
/* virtual */ void Archive( Archiver &arc );
};
inline void Powerup::Archive( Archiver &arc )
@ -137,99 +137,99 @@ inline void Powerup::Archive( Archiver &arc )
class PowerupSpeed : public Powerup
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupSpeed );
public:
CLASS_PROTOTYPE( PowerupSpeed );
PowerupSpeed() {};
~PowerupSpeed() {};
PowerupSpeed() {};
~PowerupSpeed() {};
virtual float getMoveMultiplier( void ) { return 1.5f; };
virtual float getMoveMultiplier( void ) { return 1.5f; };
};
class PowerupStrength : public Powerup
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupStrength );
public:
CLASS_PROTOTYPE( PowerupStrength );
PowerupStrength() {};
~PowerupStrength() {};
PowerupStrength() {};
~PowerupStrength() {};
/* virtual */ float getDamageDone( float damage, int meansOfDeath ) { return damage * 2.0f; };
float getDamageDone( float damage, int meansOfDeath ) { Q_UNUSED(meansOfDeath); return damage * 2.0f; }
};
class PowerupProtection : public Powerup
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupProtection );
public:
CLASS_PROTOTYPE( PowerupProtection );
PowerupProtection() {};
~PowerupProtection() {};
PowerupProtection() {};
~PowerupProtection() {};
/* virtual */ float getDamageTaken( Entity *attacker, float damage, int meansOfDeath );
/* virtual */ float getDamageTaken( Entity *attacker, float damage, int meansOfDeath );
};
class PowerupProtectionTemp : public PowerupProtection
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupProtectionTemp );
public:
CLASS_PROTOTYPE( PowerupProtectionTemp );
PowerupProtectionTemp() {};
~PowerupProtectionTemp() {};
PowerupProtectionTemp() {};
~PowerupProtectionTemp() {};
/* virtual */ float getDamageDone( float damage, int meansOfDeath );
/* virtual */ bool canDrop( void ) { return false; }
/* virtual */ bool canStack( void ) { return false; }
/* virtual */ float getDamageDone( float damage, int meansOfDeath );
/* virtual */ bool canDrop( void ) { return false; }
/* virtual */ bool canStack( void ) { return false; }
};
class PowerupRegen : public Powerup
{
private:
private:
static const float REGEN_SPEED;
static const float REGEN_SPEED;
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupRegen );
public:
CLASS_PROTOTYPE( PowerupRegen );
PowerupRegen() {};
~PowerupRegen() {};
PowerupRegen() {};
~PowerupRegen() {};
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ void specificUpdate( float frameTime );
};
class PowerupInvisibility : public Powerup
{
private:
bool _started;
private:
bool _started;
protected:
protected:
public:
CLASS_PROTOTYPE( PowerupInvisibility );
public:
CLASS_PROTOTYPE( PowerupInvisibility );
PowerupInvisibility();
~PowerupInvisibility();
PowerupInvisibility();
~PowerupInvisibility();
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ void Archive( Archiver &arc );
/* virtual */ void Archive( Archiver &arc );
};
inline void PowerupInvisibility::Archive( Archiver &arc )
@ -241,33 +241,33 @@ inline void PowerupInvisibility::Archive( Archiver &arc )
class Rune : public PowerupBase
{
protected:
Vector _originalOrigin;
bool _originalOriginSet;
public:
CLASS_PROTOTYPE( Rune );
protected:
Vector _originalOrigin;
bool _originalOriginSet;
Rune();
virtual ~Rune() {}
public:
CLASS_PROTOTYPE( Rune );
/* virtual */ void setOrigin( const Vector &point );
void setOriginalOrigin( const Vector &point, bool force );
Vector getOriginalOrigin( void) { return _originalOrigin;}
Rune();
virtual ~Rune() {}
/* virtual */ void spawn( const Vector &origin );
/* virtual */ void setOrigin( const Vector &point );
void setOriginalOrigin( const Vector &point, bool force );
Vector getOriginalOrigin( void) { return _originalOrigin;}
/* virtual */ Item * ItemPickup( Entity *other, qboolean add_to_inventory, qboolean );
/* virtual */ void spawn( const Vector &origin );
/* virtual */ void givePlayerItem( Player *player );
/* virtual */ Item * ItemPickup( Entity *other, qboolean add_to_inventory, qboolean );
static Rune * CreateRune( const str &className, const str &modelName, Sentient *sentient );
/* virtual */ void givePlayerItem( Player *player );
/* virtual */ void cacheStrings( void );
static Rune * CreateRune( const str &className, const str &modelName, Sentient *sentient );
void respawnAtOriginalOrigin( Event *ev );
/* virtual */ void cacheStrings( void );
/* virtual */ void Archive( Archiver &arc );
void respawnAtOriginalOrigin( Event *ev );
/* virtual */ void Archive( Archiver &arc );
};
inline void Rune::Archive( Archiver &arc )
@ -280,38 +280,38 @@ inline void Rune::Archive( Archiver &arc )
class RuneDeathQuad : public Rune
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( RuneDeathQuad );
public:
CLASS_PROTOTYPE( RuneDeathQuad );
RuneDeathQuad() {};
~RuneDeathQuad() {};
RuneDeathQuad() {};
~RuneDeathQuad() {};
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ float getDamageDone( float damage, int meansOfDeath ) { return damage * 4.0f; };
/* virtual */ bool canOwnerRegenerate( void ) { return false; }
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ float getDamageDone( float damage, int meansOfDeath ) { Q_UNUSED(meansOfDeath); return damage * 4.0f; }
/* virtual */ bool canOwnerRegenerate( void ) { return false; }
};
class RuneAmmoRegen : public Rune
{
private:
float _nextGiveTime;
private:
float _nextGiveTime;
protected:
protected:
public:
CLASS_PROTOTYPE( RuneAmmoRegen );
public:
CLASS_PROTOTYPE( RuneAmmoRegen );
RuneAmmoRegen();
~RuneAmmoRegen() {};
RuneAmmoRegen();
~RuneAmmoRegen() {};
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ void specificUpdate( float frameTime );
/* virtual */ void Archive( Archiver &arc );
/* virtual */ void Archive( Archiver &arc );
};
inline void RuneAmmoRegen::Archive( Archiver &arc )
@ -323,51 +323,51 @@ inline void RuneAmmoRegen::Archive( Archiver &arc )
class RuneEmpathyShield : public Rune
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( RuneEmpathyShield );
public:
CLASS_PROTOTYPE( RuneEmpathyShield );
RuneEmpathyShield() {};
~RuneEmpathyShield() {};
RuneEmpathyShield() {};
~RuneEmpathyShield() {};
/* virtual */ float getDamageTaken( Entity *attacker, float damage, int meansOfDeath );
/* virtual */ float getDamageTaken( Entity *attacker, float damage, int meansOfDeath );
};
class RuneArmorPiercing : public Rune
{
private:
private:
protected:
protected:
public:
CLASS_PROTOTYPE( RuneArmorPiercing );
public:
CLASS_PROTOTYPE( RuneArmorPiercing );
RuneArmorPiercing() {};
~RuneArmorPiercing() {};
RuneArmorPiercing() {};
~RuneArmorPiercing() {};
/* virtual */ meansOfDeath_t changetMeansOfDeath( meansOfDeath_t meansOfDeath ) { return MOD_ARMOR_PIERCING; };
/* virtual */ meansOfDeath_t changetMeansOfDeath( meansOfDeath_t meansOfDeath ) { Q_UNUSED(meansOfDeath); return MOD_ARMOR_PIERCING; }
};
class HoldableItem : public PowerupBase
{
protected:
protected:
public:
CLASS_PROTOTYPE( HoldableItem );
public:
CLASS_PROTOTYPE( HoldableItem );
HoldableItem();
virtual ~HoldableItem() {}
HoldableItem();
virtual ~HoldableItem() {}
virtual bool use( void ) { return true; }
virtual bool use( void ) { return true; }
/* virtual */ void givePlayerItem( Player *player );
/* virtual */ void givePlayerItem( Player *player );
static HoldableItem *createHoldableItem( const str &className, const str &modelName, Sentient *sentient );
static HoldableItem *createHoldableItem( const str &className, const str &modelName, Sentient *sentient );
/* virtual */ void cacheStrings( void );
/* virtual */ void cacheStrings( void );
};
class HoldableItemHealth : public HoldableItem
@ -375,8 +375,8 @@ class HoldableItemHealth : public HoldableItem
public:
CLASS_PROTOTYPE( HoldableItemHealth );
HoldableItemHealth() {};
~HoldableItemHealth() {};
HoldableItemHealth() {};
~HoldableItemHealth() {};
/* virtual */ bool use( void );
};
@ -386,8 +386,8 @@ class HoldableItemProtection : public HoldableItem
public:
CLASS_PROTOTYPE( HoldableItemProtection );
HoldableItemProtection() {};
~HoldableItemProtection() {};
HoldableItemProtection() {};
~HoldableItemProtection() {};
/* virtual */ bool use( void );
};
@ -397,8 +397,8 @@ class HoldableItemTransporter : public HoldableItem
public:
CLASS_PROTOTYPE( HoldableItemTransporter );
HoldableItemTransporter() {};
~HoldableItemTransporter() {};
HoldableItemTransporter() {};
~HoldableItemTransporter() {};
/* virtual */ bool use( void );
};
@ -419,8 +419,8 @@ private:
public:
CLASS_PROTOTYPE( HoldableItemExplosive );
HoldableItemExplosive();
~HoldableItemExplosive();
HoldableItemExplosive();
~HoldableItemExplosive();
/* virtual */ bool use( void );
/* virtual */ void specificUpdate( float frameTime );

View File

@ -175,7 +175,7 @@ void Sys_PumpEvents( void );
#endif
#define Q_UNUSED(x) (void)x;
#define Q_UNUSED(x) (void)x
//=============================================================

View File

@ -175,7 +175,7 @@ void RangedCombatWithWeapon::Begin( Actor &self )
//
// Returns: True or False
//--------------------------------------------------------------
BehaviorReturnCode_t RangedCombatWithWeapon::Evaluate ( Actor &self )
BehaviorReturnCode_t RangedCombatWithWeapon::Evaluate ( Actor & )
{
BehaviorReturnCode_t stateResult;
think();

View File

@ -76,7 +76,7 @@ SelectBestWeapon::~SelectBestWeapon()
//
// Returns: None
//--------------------------------------------------------------
void SelectBestWeapon::SetArgs( Event *ev )
void SelectBestWeapon::SetArgs( Event * )
{
}
@ -92,7 +92,7 @@ void SelectBestWeapon::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void SelectBestWeapon::AnimDone( Event *ev )
void SelectBestWeapon::AnimDone( Event * )
{
_animDone = true;
}
@ -124,7 +124,7 @@ void SelectBestWeapon::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t SelectBestWeapon::Evaluate( Actor &self )
BehaviorReturnCode_t SelectBestWeapon::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -223,7 +223,7 @@ BehaviorReturnCode_t SelectBestWeapon::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void SelectBestWeapon::End(Actor &self)
void SelectBestWeapon::End(Actor &)
{
}
@ -402,6 +402,7 @@ BehaviorReturnCode_t SelectBestWeapon::evaluateStateSelectWeapon()
//--------------------------------------------------------------
void SelectBestWeapon::failureStateSelectWeapon(const str& failureReason)
{
Q_UNUSED(failureReason);
}
@ -453,6 +454,7 @@ BehaviorReturnCode_t SelectBestWeapon::evaluateStatePutAwayCurrentWeapon()
//--------------------------------------------------------------
void SelectBestWeapon::failureStatePutAwayCurrentWeapon(const str& failureReason)
{
Q_UNUSED(failureReason);
}
//--------------------------------------------------------------
@ -503,6 +505,7 @@ BehaviorReturnCode_t SelectBestWeapon::evaluateStatePullOutNewWeapon()
//--------------------------------------------------------------
void SelectBestWeapon::failureStatePullOutNewWeapon(const str& failureReason)
{
Q_UNUSED(failureReason);
}
void SelectBestWeapon::setupStateReadyNewWeapon()
@ -523,6 +526,7 @@ BehaviorReturnCode_t SelectBestWeapon::evaluateStateReadyNewWeapon()
void SelectBestWeapon::failureStateReadyNewWeapon( const str &failureReason )
{
Q_UNUSED(failureReason);
}
bool SelectBestWeapon::CanExecute( Actor &self )

View File

@ -107,7 +107,7 @@ void SnipeEnemy::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void SnipeEnemy::AnimDone( Event *ev )
void SnipeEnemy::AnimDone( Event * )
{
_animDone = true;
}
@ -145,7 +145,7 @@ void SnipeEnemy::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t SnipeEnemy::Evaluate( Actor &self )
BehaviorReturnCode_t SnipeEnemy::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -259,7 +259,7 @@ BehaviorReturnCode_t SnipeEnemy::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void SnipeEnemy::End(Actor &self)
void SnipeEnemy::End(Actor &)
{
if ( !_self )
return;
@ -734,7 +734,7 @@ BehaviorReturnCode_t SnipeEnemy::evaluateStatePreFire()
//--------------------------------------------------------------
void SnipeEnemy::failureStatePreFire( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -851,6 +851,6 @@ BehaviorReturnCode_t SnipeEnemy::evaluateStatePostFire()
//--------------------------------------------------------------
void SnipeEnemy::failureStatePostFire( const str& failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -101,7 +101,7 @@ void StationaryFireCombat::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void StationaryFireCombat::AnimDone( Event *ev )
void StationaryFireCombat::AnimDone( Event * )
{
_animDone = true;
}
@ -135,7 +135,7 @@ void StationaryFireCombat::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t StationaryFireCombat::Evaluate( Actor &self )
BehaviorReturnCode_t StationaryFireCombat::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -250,7 +250,7 @@ BehaviorReturnCode_t StationaryFireCombat::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void StationaryFireCombat::End(Actor &self)
void StationaryFireCombat::End(Actor &)
{
if ( !_self )
return;
@ -508,6 +508,7 @@ BehaviorReturnCode_t StationaryFireCombat::evaluateStatePreFire()
void StationaryFireCombat::failureStatePreFire( const str &failureReason )
{
Q_UNUSED(failureReason);
}
void StationaryFireCombat::setupStatePostFire()
@ -528,6 +529,7 @@ BehaviorReturnCode_t StationaryFireCombat::evaluateStatePostFire()
void StationaryFireCombat::failureStatePostFire( const str &failureReason )
{
Q_UNUSED(failureReason);
}
//--------------------------------------------------------------

View File

@ -100,7 +100,7 @@ void StationaryFireCombatEX::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void StationaryFireCombatEX::AnimDone( Event *ev )
void StationaryFireCombatEX::AnimDone( Event * )
{
_animDone = true;
}
@ -134,7 +134,7 @@ void StationaryFireCombatEX::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t StationaryFireCombatEX::Evaluate( Actor &self )
BehaviorReturnCode_t StationaryFireCombatEX::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -249,7 +249,7 @@ BehaviorReturnCode_t StationaryFireCombatEX::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void StationaryFireCombatEX::End(Actor &self)
void StationaryFireCombatEX::End(Actor &)
{
if ( !_self )
return;
@ -535,6 +535,7 @@ BehaviorReturnCode_t StationaryFireCombatEX::evaluateStatePreFire()
void StationaryFireCombatEX::failureStatePreFire( const str &failureReason )
{
Q_UNUSED(failureReason);
}
void StationaryFireCombatEX::setupStatePostFire()
@ -555,6 +556,7 @@ BehaviorReturnCode_t StationaryFireCombatEX::evaluateStatePostFire()
void StationaryFireCombatEX::failureStatePostFire( const str &failureReason )
{
Q_UNUSED(failureReason);
}
//--------------------------------------------------------------

View File

@ -115,7 +115,7 @@ void SuppressionFireCombat::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void SuppressionFireCombat::AnimDone( Event *ev )
void SuppressionFireCombat::AnimDone( Event * )
{
}
@ -148,7 +148,7 @@ void SuppressionFireCombat::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t SuppressionFireCombat::Evaluate( Actor &self )
BehaviorReturnCode_t SuppressionFireCombat::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -255,7 +255,7 @@ BehaviorReturnCode_t SuppressionFireCombat::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void SuppressionFireCombat::End(Actor &self)
void SuppressionFireCombat::End(Actor &)
{
}

View File

@ -35,36 +35,36 @@ Event EV_TalkBehavior_GreetingDone
/****************************************************************************
Talk Class Definition
Talk Class Definition
****************************************************************************/
CLASS_DECLARATION( Behavior, Talk, NULL )
{
{ &EV_TalkBehavior_GreetingDone, &Talk::GreetingDone },
{ &EV_Behavior_AnimDone, &Talk::AnimDone },
{ NULL, NULL }
};
{
{ &EV_TalkBehavior_GreetingDone, &Talk::GreetingDone },
{ &EV_Behavior_AnimDone, &Talk::AnimDone },
{ NULL, NULL }
};
void Talk::SetUser
(
Sentient *user
)
{
{
ent_listening = user;
}
}
void Talk::AnimDone
(
Event *ev
Event *
)
{
{
turnto.ProcessEvent( EV_Behavior_AnimDone );
animDone = true;
}
}
void Talk::GreetingDone( Event *ev )
void Talk::GreetingDone( Event * )
{
mode = TALK_MODE_TURN_TO;
}
@ -74,12 +74,12 @@ void Talk::Begin
Actor &self
)
{
{
Vector dir;
Vector angles;
const char *anim_name;
oldAnimName = "";
anim_name = self.animname;
last_headwatch_target = self.headWatcher->GetWatchTarget();
@ -88,57 +88,57 @@ void Talk::Begin
turnto.SetUseTurnAnim( false );
/*
if ( strncmp( anim_name, "sit_leanover", 12 ) == 0 )
{
move_allowed = false;
}
{
move_allowed = false;
}
else if ( strncmp( anim_name, "sit", 3 ) == 0 )
{
move_allowed = false;
self.SetAnim( "sit_talk" );
}
{
move_allowed = false;
self.SetAnim( "sit_talk" );
}
else if ( strncmp( anim_name, "talk_sit_stunned", 15 ) == 0 )
{
move_allowed = false;
}
{
move_allowed = false;
}
else if ( strncmp( anim_name, "talk_headset", 12 ) == 0 )
{
move_allowed = true;
}
{
move_allowed = true;
}
else if ( strncmp( anim_name, "stand_hypnotized", 16 ) == 0 )
{
move_allowed = false;
}
{
move_allowed = false;
}
else if ( strncmp( anim_name, "talk_hipnotic", 13 ) == 0 )
{
move_allowed = false;
}
{
move_allowed = false;
}
else if ( strncmp( anim_name, "rope", 4 ) == 0 )
{
move_allowed = false;
}
{
move_allowed = false;
}
else
{
move_allowed = true;
self.SetAnim( "talk" );
}*/
{
move_allowed = true;
self.SetAnim( "talk" );
}*/
if ( self.talkMode == TALK_IGNORE )
{
{
move_allowed = false;
}
}
if ( self.talkMode == TALK_HEADWATCH )
{
{
move_allowed = false;
oldAnimName = self.animname;
}
}
if ( self.talkMode != TALK_IGNORE )
{
{
if ( ent_listening )
self.headWatcher->SetWatchTarget( ent_listening );
}
}
mode = TALK_MODE_PLAY_GREETING;
@ -151,27 +151,27 @@ void Talk::Begin
original_yaw = self.angles[YAW];
if ( ent_listening )
{
{
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
yaw = angles[YAW];
}
}
/*if ( !self.GetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM) )
{
self.SetAnim( "conv" , EV_Actor_NotifyBehavior );
self.SetActorFlag( ACTOR_FLAG_PLAYING_DIALOG_ANIM , true );
}
{
self.SetAnim( "conv" , EV_Actor_NotifyBehavior );
self.SetActorFlag( ACTOR_FLAG_PLAYING_DIALOG_ANIM , true );
}
*/
}
}
BehaviorReturnCode_t Talk::Evaluate
(
Actor &self
)
{
{
Vector dir;
Vector angles;
str greetingDialog;
@ -186,229 +186,229 @@ BehaviorReturnCode_t Talk::Evaluate
mode = TALK_MODE_TURN_BACK;
if ( !self.GetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM) && animDone && self.GetActorFlag(ACTOR_FLAG_DIALOG_PLAYING) )
{
{
if ( self.useConvAnims )
{
{
//self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true);
self.SetAnim( "talk" , EV_Actor_NotifyBehavior );
self.SetActorFlag( ACTOR_FLAG_PLAYING_DIALOG_ANIM , true );
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , false );
animDone = false;
}
}
}
if ( self.useConvAnims && animDone && mode != TALK_MODE_WAIT && mode != TALK_MODE_TURN_TO )
{
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true);
self.SetAnim( "conv-idle" , EV_Actor_NotifyBehavior );
//self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , false );
//self.SetAnim( "idle" );
animDone = false;
}
{
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true);
self.SetAnim( "conv-idle" , EV_Actor_NotifyBehavior );
//self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , false );
//self.SetAnim( "idle" );
animDone = false;
}
if ( self.useConvAnims && /*animDone &&*/ mode == TALK_MODE_WAIT )
{
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true);
if ( oldAnimName.length() )
self.SetAnim( oldAnimName );
else
self.SetAnim( "idle" );
animDone = false;
}
{
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true);
if ( oldAnimName.length() )
self.SetAnim( oldAnimName );
else
self.SetAnim( "idle" );
animDone = false;
}
if ( !self.GetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM) && !self.GetActorFlag(ACTOR_FLAG_DIALOG_PLAYING) && !self.talkMode == TALK_HEADWATCH )
{
{
self.SetAnim( "idle" );
animDone = true;
}
}
if ( self.GetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM) && animDone )
{
{
if ( oldAnimName.length() )
{
{
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true );
self.SetAnim( oldAnimName );
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , false );
if ( mode != TALK_MODE_TURN_BACK )
mode = TALK_MODE_WAIT;
}
}
}
switch( mode )
{
case TALK_MODE_COMBAT:
combatDialog = self.FindDialog( ent_listening, DIALOG_TYPE_COMBAT );
if ( !combatDialog.length() )
return BEHAVIOR_SUCCESS;
self.PlayDialog( ent_listening , -1.0f, -1.0f, combatDialog.c_str() );
{
case TALK_MODE_COMBAT:
combatDialog = self.FindDialog( ent_listening, DIALOG_TYPE_COMBAT );
if ( !combatDialog.length() )
return BEHAVIOR_SUCCESS;
self.PlayDialog( ent_listening , -1.0f, -1.0f, combatDialog.c_str() );
return BEHAVIOR_SUCCESS;
break;
case TALK_MODE_PLAY_GREETING:
greetingDialog = self.FindDialog( ent_listening, DIALOG_TYPE_GREETING );
if ( !greetingDialog.length() )
{
mode = TALK_MODE_TURN_TO;
return BEHAVIOR_EVALUATING;
}
case TALK_MODE_PLAY_GREETING:
greetingDialog = self.FindDialog( ent_listening, DIALOG_TYPE_GREETING );
if ( !greetingDialog.length() )
{
mode = TALK_MODE_TURN_TO;
return BEHAVIOR_EVALUATING;
}
gi.LocalizeFilePath( greetingDialog.c_str(), localizedDialogName );
greetingDialogLength = gi.SoundLength( localizedDialogName );
gi.LocalizeFilePath( greetingDialog.c_str(), localizedDialogName );
greetingDialogLength = gi.SoundLength( localizedDialogName );
if ( greetingDialogLength > 0 )
{
greetingEvent = new Event(EV_TalkBehavior_GreetingDone);
PostEvent(greetingEvent , greetingDialogLength );
if ( greetingDialogLength > 0 )
{
greetingEvent = new Event(EV_TalkBehavior_GreetingDone);
PostEvent(greetingEvent , greetingDialogLength );
Event *dialogEvent = new Event( EV_SimplePlayDialog );
dialogEvent->AddString( greetingDialog.c_str() );
ent_listening->ProcessEvent( dialogEvent );
//ent_listening->Sound( greetingDialog );
Event *dialogEvent = new Event( EV_SimplePlayDialog );
dialogEvent->AddString( greetingDialog.c_str() );
ent_listening->ProcessEvent( dialogEvent );
//ent_listening->Sound( greetingDialog );
mode = TALK_MODE_WAIT_FOR_GREETING;
}
else
{
mode = TALK_MODE_TURN_TO;
}
mode = TALK_MODE_WAIT_FOR_GREETING;
}
else
{
mode = TALK_MODE_TURN_TO;
}
break;
case TALK_MODE_WAIT_FOR_GREETING:
//Waiting on the Greeting Done Event Here
case TALK_MODE_WAIT_FOR_GREETING:
//Waiting on the Greeting Done Event Here
break;
case TALK_MODE_TURN_TO :
if ( move_allowed )
{
turnto.SetDirection( yaw );
case TALK_MODE_TURN_TO :
if ( move_allowed )
{
turnto.SetDirection( yaw );
if ( !turnto.Evaluate( self ) )
{
mode = TALK_MODE_TALK;
self.PlayDialog( ent_listening );
/* event = new Event( EV_Player_WatchActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0.05 ); */
}
}
else
{
if ( !turnto.Evaluate( self ) )
{
mode = TALK_MODE_TALK;
self.PlayDialog( ent_listening );
/* event = new Event( EV_Player_WatchActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0.05 ); */
}
break;
case TALK_MODE_TALK :
}
}
else
{
mode = TALK_MODE_TALK;
self.PlayDialog( ent_listening );
if ( move_allowed )
{
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
turnto.SetDirection( angles[YAW] );
turnto.Evaluate( self );
}
/* event = new Event( EV_Player_WatchActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0.05 ); */
}
break;
case TALK_MODE_TALK :
if ( !self.GetActorFlag( ACTOR_FLAG_DIALOG_PLAYING ) )
{
mode = TALK_MODE_WAIT;
self.state_flags &= ~STATE_FLAG_USED;
// Tell player to stop watching us
/* event = new Event( EV_Player_StopWatchingActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0 ); */
//ent_listening->CancelEventsOfType( EV_Player_WatchActor );
}
else if ( !self.GetActorFlag( ACTOR_FLAG_RADIUS_DIALOG_PLAYING ) )
{
if ( !self.WithinDistance( ent_listening, self.radiusDialogRange ) )
{
self.PlayRadiusDialog( ent_listening );
/*
int postive_response = true;
str check_alias;
if (postive_response)
{
check_alias = self.GetRandomAlias("radiusdialog_positive");
if(check_alias.length())
{
self.PlayRadiusDialog(ent_listening, "radiusdialog_positive");
}
}
else
{
check_alias = self.GetRandomAlias("radiusdialog_negative");
if(check_alias.length())
{
self.PlayRadiusDialog(ent_listening, "radiusdialog_negative");
}
}
*/
}
}
break;
case TALK_MODE_WAIT :
if ( move_allowed )
{
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
turnto.SetDirection( angles[YAW] );
turnto.Evaluate( self );
}
if ( !self.WithinDistance( ent_listening, 100.0f ) )
mode = TALK_MODE_TURN_BACK;
if ( self.state_flags & STATE_FLAG_USED )
{
mode = TALK_MODE_TURN_TO;
self.SetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM, false );
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
yaw = angles[YAW];
self.state_flags &= ~STATE_FLAG_USED;
/* event = new Event( EV_Player_WatchActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0.05 ); */
}
break;
case TALK_MODE_TURN_BACK :
if ( move_allowed )
{
turnto.SetDirection( original_yaw );
if ( !turnto.Evaluate( self ) )
return BEHAVIOR_SUCCESS;
}
else
{
return BEHAVIOR_SUCCESS;
}
break;
if ( move_allowed )
{
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
turnto.SetDirection( angles[YAW] );
turnto.Evaluate( self );
}
return BEHAVIOR_EVALUATING;
if ( !self.GetActorFlag( ACTOR_FLAG_DIALOG_PLAYING ) )
{
mode = TALK_MODE_WAIT;
self.state_flags &= ~STATE_FLAG_USED;
// Tell player to stop watching us
/* event = new Event( EV_Player_StopWatchingActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0 ); */
//ent_listening->CancelEventsOfType( EV_Player_WatchActor );
}
else if ( !self.GetActorFlag( ACTOR_FLAG_RADIUS_DIALOG_PLAYING ) )
{
if ( !self.WithinDistance( ent_listening, self.radiusDialogRange ) )
{
self.PlayRadiusDialog( ent_listening );
/*
int postive_response = true;
str check_alias;
if (postive_response)
{
check_alias = self.GetRandomAlias("radiusdialog_positive");
if(check_alias.length())
{
self.PlayRadiusDialog(ent_listening, "radiusdialog_positive");
}
}
else
{
check_alias = self.GetRandomAlias("radiusdialog_negative");
if(check_alias.length())
{
self.PlayRadiusDialog(ent_listening, "radiusdialog_negative");
}
}
*/
}
}
break;
case TALK_MODE_WAIT :
if ( move_allowed )
{
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
turnto.SetDirection( angles[YAW] );
turnto.Evaluate( self );
}
if ( !self.WithinDistance( ent_listening, 100.0f ) )
mode = TALK_MODE_TURN_BACK;
if ( self.state_flags & STATE_FLAG_USED )
{
mode = TALK_MODE_TURN_TO;
self.SetActorFlag(ACTOR_FLAG_PLAYING_DIALOG_ANIM, false );
dir = ent_listening->centroid - self.centroid;
angles = dir.toAngles();
yaw = angles[YAW];
self.state_flags &= ~STATE_FLAG_USED;
/* event = new Event( EV_Player_WatchActor );
event->AddEntity( &self );
ent_listening->PostEvent( event, 0.05 ); */
}
break;
case TALK_MODE_TURN_BACK :
if ( move_allowed )
{
turnto.SetDirection( original_yaw );
if ( !turnto.Evaluate( self ) )
return BEHAVIOR_SUCCESS;
}
else
{
return BEHAVIOR_SUCCESS;
}
break;
}
return BEHAVIOR_EVALUATING;
}
void Talk::End( Actor &self )
{
{
self.SetActorFlag( ACTOR_FLAG_PLAYING_DIALOG_ANIM , false );
self.SetActorFlag(ACTOR_FLAG_CAN_CHANGE_ANIM , true );
@ -416,18 +416,18 @@ void Talk::End( Actor &self )
self.ClearTorsoAnim();
if ( oldAnimName.length() )
{
{
self.SetAnim( oldAnimName );
}
}
else
{
{
self.SetAnim( "idle" );
}
}
if ( last_headwatch_target )
self.headWatcher->SetWatchTarget( last_headwatch_target );
else
self.headWatcher->SetWatchTarget( NULL );
}
}

View File

@ -72,7 +72,7 @@ void AnimatedTeleportToPlayer::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void AnimatedTeleportToPlayer::Begin( Actor &self )
void AnimatedTeleportToPlayer::Begin( Actor & )
{
_state = ANIM_TELEPORT_BEGIN;
}
@ -222,7 +222,7 @@ BehaviorReturnCode_t AnimatedTeleportToPlayer::Evaluate ( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void AnimatedTeleportToPlayer::End( Actor &self )
void AnimatedTeleportToPlayer::End( Actor & )
{
}
@ -249,6 +249,8 @@ bool AnimatedTeleportToPlayer::testPosition( Actor &self, int test_pos, Vector &
Vector player_left;
trace_t trace;
Q_UNUSED(test_pos);
// Get the position to test
test_position = player->origin;

View File

@ -88,7 +88,7 @@ void AnimatedTeleportToPosition::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void AnimatedTeleportToPosition::Begin( Actor &self )
void AnimatedTeleportToPosition::Begin( Actor & )
{
_state = ANIM_TELEPORT_BEGIN;
}
@ -211,7 +211,7 @@ BehaviorReturnCode_t AnimatedTeleportToPosition::Evaluate ( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void AnimatedTeleportToPosition::End( Actor &self )
void AnimatedTeleportToPosition::End( Actor & )
{
}

View File

@ -110,7 +110,7 @@ void TorsoAimAndFireWeapon::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void TorsoAimAndFireWeapon::AnimDone( Event *ev )
void TorsoAimAndFireWeapon::AnimDone( Event * )
{
/*if ( _state == TORSO_AIM_AND_FIRE_POST_FIRE )
@ -285,7 +285,7 @@ BehaviorReturnCode_t TorsoAimAndFireWeapon::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void TorsoAimAndFireWeapon::End(Actor &self)
void TorsoAimAndFireWeapon::End(Actor &)
{
if ( !_self )
return;
@ -805,7 +805,7 @@ BehaviorReturnCode_t TorsoAimAndFireWeapon::evaluateStatePreFire()
//--------------------------------------------------------------
void TorsoAimAndFireWeapon::failureStatePreFire( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -958,5 +958,5 @@ BehaviorReturnCode_t TorsoAimAndFireWeapon::evaluateStatePostFire()
//--------------------------------------------------------------
void TorsoAimAndFireWeapon::failureStatePostFire( const str& failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -98,7 +98,7 @@ void UseAlarm::SetArgs ( Event *ev)
//
// Returns: None
//--------------------------------------------------------------
void UseAlarm::AnimDone( Event *ev )
void UseAlarm::AnimDone( Event * )
{
switch( _state )
{
@ -119,7 +119,7 @@ void UseAlarm::AnimDone( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void UseAlarm::HandleNodeCommand( Event *ev )
void UseAlarm::HandleNodeCommand( Event * )
{
}
@ -149,7 +149,7 @@ void UseAlarm::Begin( Actor &self )
//
// Returns: True or False
//--------------------------------------------------------------
BehaviorReturnCode_t UseAlarm::Evaluate ( Actor &self )
BehaviorReturnCode_t UseAlarm::Evaluate ( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -246,7 +246,7 @@ BehaviorReturnCode_t UseAlarm::Evaluate ( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void UseAlarm::End ( Actor &self )
void UseAlarm::End ( Actor & )
{
if ( _node )
{
@ -406,6 +406,7 @@ BehaviorReturnCode_t UseAlarm::evaluateStateFindNode()
//--------------------------------------------------------------
void UseAlarm::failureStateFindNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -454,8 +455,10 @@ BehaviorReturnCode_t UseAlarm::evaluateStateMoveToNode()
//--------------------------------------------------------------
void UseAlarm::failureStateMoveToNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
//--------------------------------------------------------------
// Name: setupStateAtNode()
// Class: UseAlarm
@ -505,6 +508,7 @@ BehaviorReturnCode_t UseAlarm::evaluateStateAtNode()
//--------------------------------------------------------------
void UseAlarm::failureStateAtNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -565,6 +569,7 @@ BehaviorReturnCode_t UseAlarm::evaluateStateWaitOnAnim()
//--------------------------------------------------------------
void UseAlarm::failureStateWaitOnAnim( const str& failureReason )
{
Q_UNUSED(failureReason);
}
//--------------------------------------------------------------
@ -618,6 +623,6 @@ BehaviorReturnCode_t UseAlarm::evaluateStateRotateToEnemy()
//--------------------------------------------------------------
void UseAlarm::failureStateRotateToEnemy( const str &failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -120,7 +120,7 @@ void WatchEntity::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void WatchEntity::AnimDone( Event *ev )
void WatchEntity::AnimDone( Event * )
{
_animDone = true;
}
@ -216,7 +216,7 @@ BehaviorReturnCode_t WatchEntity::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void WatchEntity::End(Actor &self)
void WatchEntity::End(Actor &)
{
// self.movementSubsystem->setTurnSpeed(_oldTurnSpeed);
}
@ -343,6 +343,7 @@ BehaviorReturnCode_t WatchEntity::evaluateStateRotate( Actor &self )
void WatchEntity::rotateFailed( Actor &self )
{
Q_UNUSED(self);
}
void WatchEntity::setupStateHold()
@ -378,5 +379,6 @@ BehaviorReturnCode_t WatchEntity::evaluateStateHold( Actor &self )
void WatchEntity::holdFailed( Actor &self )
{
Q_UNUSED(self);
}

View File

@ -111,7 +111,7 @@ void WatchEntityEX::SetArgs( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void WatchEntityEX::AnimDone( Event *ev )
void WatchEntityEX::AnimDone( Event * )
{
}
@ -143,7 +143,7 @@ void WatchEntityEX::Begin( Actor &self )
//
// Returns: BehaviorReturnCode_t
//--------------------------------------------------------------
BehaviorReturnCode_t WatchEntityEX::Evaluate( Actor &self )
BehaviorReturnCode_t WatchEntityEX::Evaluate( Actor & )
{
BehaviorReturnCode_t stateResult;
@ -224,7 +224,7 @@ BehaviorReturnCode_t WatchEntityEX::Evaluate( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void WatchEntityEX::End(Actor &self)
void WatchEntityEX::End(Actor &)
{
}
@ -324,6 +324,7 @@ BehaviorReturnCode_t WatchEntityEX::evaluateStateSetup()
void WatchEntityEX::failureStateSetup( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -359,10 +360,12 @@ BehaviorReturnCode_t WatchEntityEX::evaluateStateRotate()
void WatchEntityEX::failureStateRotate( const str& failureReason )
{
Q_UNUSED(failureReason);
}
void WatchEntityEX::setupStateHold()
{
GetSelf()->SetAnim( _stance , NULL , legs );
@ -384,6 +387,7 @@ BehaviorReturnCode_t WatchEntityEX::evaluateStateHold()
void WatchEntityEX::failureStateHold( const str& failureReason )
{
Q_UNUSED(failureReason);
}

View File

@ -99,7 +99,7 @@ void Work::SetArgs ( Event *ev)
//
// Returns: None
//--------------------------------------------------------------
void Work::AnimDone( Event *ev )
void Work::AnimDone( Event * )
{
switch( _state )
{
@ -124,7 +124,7 @@ void Work::AnimDone( Event *ev )
//
// Returns: None
//--------------------------------------------------------------
void Work::HandleNodeCommand( Event *ev )
void Work::HandleNodeCommand( Event * )
{
switch( _state )
{
@ -377,7 +377,7 @@ BehaviorReturnCode_t Work::Evaluate ( Actor &self )
//
// Returns: None
//--------------------------------------------------------------
void Work::End ( Actor &self )
void Work::End ( Actor&)
{
if ( _node )
{
@ -570,6 +570,7 @@ BehaviorReturnCode_t Work::evaluateStateFindNode()
//--------------------------------------------------------------
void Work::failureStateFindNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -618,6 +619,7 @@ BehaviorReturnCode_t Work::evaluateStateMoveToNode()
//--------------------------------------------------------------
void Work::failureStateMoveToNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -670,6 +672,7 @@ BehaviorReturnCode_t Work::evaluateStateAtNode()
//--------------------------------------------------------------
void Work::failureStateAtNode( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -725,6 +728,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateWaitOnTime()
//--------------------------------------------------------------
void Work::failureStateAnimateWaitOnTime( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -775,6 +779,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateWaitOnAnim()
//--------------------------------------------------------------
void Work::failureStateAnimateWaitOnAnim( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -825,6 +830,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateWaitOnSignal()
//--------------------------------------------------------------
void Work::failureStateAnimateWaitOnSignal( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -871,6 +877,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateConstant()
//--------------------------------------------------------------
void Work::failureStateAnimateConstant( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -933,6 +940,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateListWaitOnTime()
//--------------------------------------------------------------
void Work::failureStateAnimateListWaitOnTime( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -995,6 +1003,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateListWaitOnAnim()
//--------------------------------------------------------------
void Work::failureStateAnimateListWaitOnAnim( const str& failureReason )
{
Q_UNUSED(failureReason);
}
@ -1057,6 +1066,7 @@ BehaviorReturnCode_t Work::evaluateStateAnimateListWaitOnSignal()
//--------------------------------------------------------------
void Work::failureStateAnimateListWaitOnSignal( const str& failureReason )
{
Q_UNUSED(failureReason);
}