mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-06 11:20:35 +00:00
Misc changes.
The first two fixes were caught by infer. The Big Bug(tm) remains unfixed. * Fixed the Leech nano power * Fixed an unlikely nullptr dereference in ItemManager * /toggleai now makes mobs retreat immediately, instead of waiting for their next movement tick * Static path mobs will now stop in place instead of retreating to their spawn points when AI is disabled * Changed the misleading config option name from "chunksize" to "viewdistance", since it's actually only a third of the chunk size
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "NanoManager.hpp"
|
||||
#include "Player.hpp"
|
||||
|
||||
#include <string.h> // for memset() and memcmp()
|
||||
#include <string.h> // for memset()
|
||||
#include <assert.h>
|
||||
|
||||
std::map<std::pair<int32_t, int32_t>, Item> ItemManager::ItemData;
|
||||
@@ -911,6 +911,10 @@ void ItemManager::setItemStats(Player* plr) {
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
itemStatsDat = ItemManager::getItemData(plr->Equip[i].iID, plr->Equip[i].iType);
|
||||
if (itemStatsDat == nullptr) {
|
||||
std::cout << "[WARN] setItemStats(): getItemData() returned NULL" << std::endl;
|
||||
continue;
|
||||
}
|
||||
plr->pointDamage += itemStatsDat->pointDamage;
|
||||
plr->groupDamage += itemStatsDat->groupDamage;
|
||||
plr->defense += itemStatsDat->defense;
|
||||
|
||||
Reference in New Issue
Block a user