Commit the third part of patch #913 which removes send/recvDestroyExtra.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3337 4a71c877-e1ca-e34f-864e-861f7616d084
master
Freddie Witherden 2008-01-04 13:43:44 +00:00
parent f4e1004604
commit 3a997a083d
4 changed files with 0 additions and 94 deletions

View File

@ -637,9 +637,6 @@ BOOL recvMessage(void)
case NET_DROIDDEST: // droid destroy
recvDestroyDroid();
break;
case NET_DESTROYXTRA:
recvDestroyExtra(&msg); // a generic destroy, complete wiht killer info.
break;
case NET_DROIDMOVE: // move a droid to x,y command.
recvDroidMove();
break;
@ -1437,94 +1434,6 @@ BOOL recvDestroyFeature(NETMSG *pMsg)
return TRUE;
}
// ////////////////////////////////////////////////////////////////////////////
// a generic destroy function, with killer info included.
BOOL sendDestroyExtra(BASE_OBJECT *psKilled,BASE_OBJECT *psKiller)
{
NETMSG m;
UDWORD n=0;
/* if(psKilled != NULL)
{
NetAdd(m,4,psKilled->id); // id of thing killed
}
else
{
NetAdd(m,4,n);
}
*/
if(psKiller != NULL)
{
NetAdd(m,0,psKiller->id); // id of killer.
}
else
{
NetAdd(m,0,n);
}
m.type = NET_DESTROYXTRA;
m.size = 4;
return NETbcast(&m,FALSE);
}
// ////////////////////////////////////////////////////////////////////////////
BOOL recvDestroyExtra(NETMSG *pMsg)
{
// BASE_OBJECT *psKilled;
// UDWORD killedId;
BASE_OBJECT *psSrc;
UDWORD srcId;
DROID *psKiller;
/*
NetGet(pMsg,0,killedId); // remove as normal
if(killedId !=0)
{
psKilled = IdToPointer(killedId,ANYPLAYER);
if(psKilled)
{
switch(psKilled->type)
{
case OBJ_DROID:
recvDestroyDroid(pMsg);
break;
case OBJ_STRUCTURE:
recvDestroyStructure(pMsg);
break;
case OBJ_FEATURE:
recvDestroyFeature(pMsg);
break;
}
}
}
*/
NetGet(pMsg,0,srcId);
if(srcId != 0)
{
psSrc = IdToPointer(srcId,ANYPLAYER);
if(psSrc && (psSrc->type == OBJ_DROID) ) // process extra bits.
{
psKiller = (DROID*)psSrc;
#if 0
// FIXME: this code *and* the code that sends this message needs to be modified
// in such a way that they update psKiller->experience with the percentage
// of damage dealt rather than just a kill count.
if(psKiller)
{
psKiller->experience++;
}
cmdDroidUpdateKills(psKiller);
#endif
return TRUE;
}
}
return FALSE;
}
// ////////////////////////////////////////////////////////////////////////////
// Network File packet processor.
BOOL recvMapFileRequested(NETMSG *pMsg)

View File

@ -255,7 +255,6 @@ extern BOOL sendDroidSecondary (const DROID* psDroid, SECONDARY_ORDER sec, SECON
extern BOOL sendDroidSecondaryAll(const DROID* psDroid);
extern BOOL sendDroidEmbark (const DROID* psDroid);
extern BOOL sendDroidDisEmbark (const DROID* psDroid);
extern BOOL sendDestroyExtra (BASE_OBJECT *psKilled,BASE_OBJECT *psKiller);
extern BOOL sendHappyVtol (const DROID* psDroid);
// Startup. mulitopt

View File

@ -59,7 +59,6 @@ extern BOOL sendWholeDroid (DROID *pD, UDWORD dest);
extern void recvOptions ();
extern void sendOptions (uint32_t dest, uint32_t play);
extern BOOL recvScoreSubmission ();
extern BOOL recvDestroyExtra (NETMSG *pMsg);
extern BOOL recvHappyVtol (void);
extern BOOL recvResearchStatus (NETMSG *pMsg);
extern BOOL recvLasSat ();

View File

@ -280,7 +280,6 @@ static void proj_UpdateKills(PROJECTILE *psObj, float experienceInc)
// If percentDamage is negative then the target was killed
if (bMultiPlayer && experienceInc < 0.0f)
{
sendDestroyExtra(psObj->psDest,psObj->psSource);
updateMultiStatsKills(psObj->psDest,psObj->psSource->player);
}