ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Character.c
(Generate patch)

Comparing Daodan/src/Daodan_Character.c (file contents):
Revision 676 by rossy, Sun Oct 18 02:26:30 2009 UTC vs.
Revision 677 by alloc, Sat Mar 2 23:46:33 2013 UTC

# Line 18 | Line 18 | int DDr_TeamToTeamID(const char* team_st
18   }
19  
20   uint32_t DDrGetCharacterIndexFromName(char* input) {
21        Character **characterlist;                                                              //pointer to array of Character pointers
22        characterlist = ONgGameState + 0x00167500;                              //Character List
23        int* total_characters = ONgGameState + 0x00167700;              //Max number of characters
21          int i;
22 <        for(i = 0; i < *total_characters; i++) {
22 >        Character **characterlist = ONgGameState->PresentCharacterList;                                                         //pointer to array of Character pointers
23 >        int total_characters = ONgGameState->PresentCharacterListCount;         //Max number of characters
24 >        for(i = 0; i < total_characters; i++) {
25                  if (characterlist[i] != 0)                                                      //anti Blam!
26                          if (!strcmp(characterlist[i]->Name, input)) {   //checks for the same name
27                          return characterlist[i]->Number;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)