diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-16 17:22:39 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-16 17:22:39 -0300 |
| commit | 6d498fe17dab48cfd8fc8a4da62a573b799e10ba (patch) | |
| tree | 1c8d55bd907b35abf014385dbedb90b2ae98f96a /src/crmain.cc | |
| parent | e65dc561acab7a9e49f59777f16cb040c574c64d (diff) | |
| download | game-6d498fe17dab48cfd8fc8a4da62a573b799e10ba.tar.gz game-6d498fe17dab48cfd8fc8a4da62a573b799e10ba.zip | |
fix most init and parsing bugs + critical bug with dynamic strings
With an appropriate query manager, the server now starts up and
seems to work but won't properly handle connections until we fix
the problem with threads and signals described in `TODO.md`.
Diffstat (limited to 'src/crmain.cc')
| -rw-r--r-- | src/crmain.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/crmain.cc b/src/crmain.cc index 96ccc92..1faee30 100644 --- a/src/crmain.cc +++ b/src/crmain.cc @@ -1140,7 +1140,6 @@ void AddKillStatistics(int AttackerRace, int DefenderRace){ KilledCreatures[DefenderRace] += 1; } - // NOTE(fusion): This seems to track how many players are killed by if(strcmp(RaceData[DefenderRace].Name, "human") == 0){ KilledPlayers[AttackerRace] += 1; } @@ -1458,7 +1457,7 @@ void LoadRace(const char *FileName){ }else if(strcmp(Identifier, "flags") == 0){ Script.readSymbol('{'); do{ - const char *Flag = Script.getIdentifier(); + const char *Flag = Script.readIdentifier(); if(strcmp(Flag, "kickboxes") == 0){ Race->KickBoxes = true; }else if(strcmp(Flag, "kickcreatures") == 0){ @@ -1800,17 +1799,17 @@ void LoadMonsterRaid(const char *FileName, int Start, Script.nextToken(); if(strcmp(Script.getIdentifier(), "date") == 0){ Script.readSymbol('='); - *Date = Script.getNumber(); + *Date = Script.readNumber(); }else if(strcmp(Script.getIdentifier(), "interval") == 0){ Script.readSymbol('='); - *Interval = Script.getNumber(); + *Interval = Script.readNumber(); }else{ Script.error("date or interval expected"); } Script.nextToken(); while(Script.Token != ENDOFFILE){ - if(strcmp(Script.getIdentifier(), "delay") == 0){ + if(strcmp(Script.getIdentifier(), "delay") != 0){ Script.error("delay expected"); } @@ -1928,7 +1927,7 @@ void LoadMonsterRaids(void){ SecondsToReboot += 86400; } - char BigRaidName[4096]; + char BigRaidName[4096] = {}; int BigRaidDuration = 0; int BigRaidTieBreaker = -1; |
