I am working in the gameStateUpdate function within the loop.cpp file and I know that it iterates through the droid list at the for loop starting at line 612. I know the health stat is body, but I can't seem to find the variable for the damage that the droid does with each shot. Is it just poorly named or how would I go about retrieving the variable?
What would I do at the point I have marked to find each DROID's damage?
for (unsigned i = 0; i < MAX_PLAYERS; i++)
{
//update the current power available for a player
updatePlayerPower(i);
DROID *psNext;
for (DROID *psCurr = apsDroidLists; psCurr != NULL; psCurr = psNext)
{
// Copy the next pointer - not 100% sure if the droid could get destroyed but this covers us anyway
Working here ----> psCurr->(what?)
psNext = psCurr->psNext;
droidUpdate(psCurr);
}
Where do I get Droid damage from loop.cpp file
Re: Where do I get Droid damage from loop.cpp file
Hmm ? Damage is calculated, depending on what weapon they got...
/facepalm ...Grinch stole Warzone contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
Super busy, don't expect a timely reply back.
Re: Where do I get Droid damage from loop.cpp file
That's what I thought, but when I have done psCurr->asWeaps, there is no variable for damage. At least not declared in a comment or an explicitly named variable. As I see it, the droid can hold up to three weapons, but I still don't see where the damage is defined. Sorry if I'm missing something easy or making a stupid mistake.vexed wrote:Hmm ? Damage is calculated, depending on what weapon they got...