Merge remote-tracking branch 'ryzomcore/hg/hotfix/patches-from-atys' into ryzomclassic-develop

ryzomclassic-develop
kaetemi 5 years ago
commit 2b80ec75a9

@ -595,6 +595,7 @@ COutpostSquadManager::COutpostSquadManager(COutpost* parent, uint32 alias, std::
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -618,6 +619,7 @@ COutpostSquadManager::COutpostSquadManager(COutpost* parent, uint32 alias, std::
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -641,6 +643,7 @@ COutpostSquadManager::COutpostSquadManager(COutpost* parent, uint32 alias, std::
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -675,6 +678,7 @@ COutpostSquadManager::COutpostSquadManager(COutpost* parent, uint32 alias, std::
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);

@ -759,6 +759,7 @@ CSpireSquadManager::CSpireSquadManager(CSpire* parent, uint32 alias, std::string
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -782,6 +783,7 @@ CSpireSquadManager::CSpireSquadManager(CSpire* parent, uint32 alias, std::string
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -805,6 +807,7 @@ CSpireSquadManager::CSpireSquadManager(CSpire* parent, uint32 alias, std::string
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);
@ -839,6 +842,7 @@ CSpireSquadManager::CSpireSquadManager(CSpire* parent, uint32 alias, std::string
eventAction = NULL; eventAction = NULL;
// Register event handler // Register event handler
// FIXME: 0 == CAIAliasDescriptionNode instance
event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType); event = new CAIEventReaction(getStateMachine(), 0, eventDescription.EventType);
event->processEventDescription(&eventDescription, getStateMachine()); event->processEventDescription(&eventDescription, getStateMachine());
getStateMachine()->eventReactions().addChild(event); getStateMachine()->eventReactions().addChild(event);

@ -2688,7 +2688,7 @@ CAILogicActionCode::CAILogicActionCode (const std::vector<std::string> &args, c
const CAIAliasDescriptionNode *eventNode, CStateMachine *container) const CAIAliasDescriptionNode *eventNode, CStateMachine *container)
{ {
nldebug("loadActionCode"); nldebug("loadActionCode");
_byteCode=CCompiler::getInstance().compileCode (args, eventNode->fullName()); _byteCode=CCompiler::getInstance().compileCode (args, eventNode ? eventNode->fullName() : "NULL");
} }
bool CAILogicActionCode::executeAction(CStateInstance *entity,const IAIEvent *event) bool CAILogicActionCode::executeAction(CStateInstance *entity,const IAIEvent *event)

@ -368,7 +368,7 @@ CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(std::string cons
{ {
clean(); clean();
std::string* const strPt = new std::string(str); std::string* const strPt = new std::string(str);
_valp = *((int*)&strPt); _valp = *((uintptr_t*)&strPt);
_type = EString; _type = EString;
return *this; return *this;
} }
@ -376,7 +376,7 @@ inline
CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc) CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc)
{ {
clean(); clean();
_valp = *((int*)&sc); _valp = *((uintptr_t*)&sc);
_type = EContext; _type = EContext;
return *this; return *this;
} }

@ -88,9 +88,9 @@ I16x16Layer *I16x16Layer::compress(I16x16Layer *layer, sint32 blank)
map<sint32, uint> count; map<sint32, uint> count;
for (i=0; i<256; ++i) for (i=0; i<16; ++i) for (j=0;j<16;++j)
{ {
sint32 val = flayer->Array[0][i]; sint32 val = flayer->Array[i][j];
if (val == blank) if (val == blank)
continue; continue;

@ -141,7 +141,11 @@ public:
void set(uint i, uint j, sint value) { nlassert(i<16 && j<16); Array[i][j] = value; } void set(uint i, uint j, sint value) { nlassert(i<16 && j<16); Array[i][j] = value; }
protected: protected:
void serial(NLMISC::IStream &f) { for (uint i=0; i<16*16; ++i) f.serial(Array[0][i]); } void serial(NLMISC::IStream &f) {
for (uint i=0; i<16; ++i)
for (uint j=0; j<16; ++j)
f.serial(Array[i][j]);
}
}; };
/** /**
@ -166,8 +170,9 @@ protected:
void serial(NLMISC::IStream &f) void serial(NLMISC::IStream &f)
{ {
f.serial(Mean); f.serial(Mean);
for (uint i=0; i<16*16; ++i) for (uint i=0; i<16; ++i)
f.serial(Array[0][i]); for(uint j=0; j<16; ++j)
f.serial(Array[i][j]);
} }
}; };
@ -193,8 +198,9 @@ protected:
void serial(NLMISC::IStream &f) void serial(NLMISC::IStream &f)
{ {
f.serial(Mean); f.serial(Mean);
for (uint i=0; i<16*2; ++i) for (uint i=0; i<16; ++i)
f.serial(Array[0][i]); for (uint j=0; j<2; ++j)
f.serial(Array[i][j]);
} }
}; };

Loading…
Cancel
Save