Fixes MoveData::HasFlag using OBJLAST instead of OBJFIRST, causing memory corruption.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4d81ca1d08
commit
2396615d4a
|
@ -345,7 +345,7 @@ CreatureLib::Battling::BattleScript* AngelScriptScript::Clone(const ArbUt::Optio
|
|||
void AngelScriptScript::OnFaint(CreatureLib::Battling::Creature* creature, CreatureLib::Battling::DamageSource source) {
|
||||
CALL_HOOK(OnFaint, {
|
||||
ctx->SetArgObject(0, (void*)creature);
|
||||
ctx->SetArgDWord(1, static_cast<i32>(source));
|
||||
ctx->SetArgDWord(1, (i32)source);
|
||||
})
|
||||
}
|
||||
void AngelScriptScript::BlockWeather(CreatureLib::Battling::Battle* battle, bool* blockWeather) {
|
||||
|
|
|
@ -39,7 +39,7 @@ void RegisterMoveTypes::RegisterMoveType(asIScriptEngine* engine) {
|
|||
REGISTER_GETTER("MoveData", "int8 get_Priority() const property", CreatureLib::Library::AttackData, GetPriority);
|
||||
|
||||
r = engine->RegisterObjectMethod("MoveData", "bool HasFlag(const constString &in flag) const", asFUNCTION(HasFlag),
|
||||
asCALL_CDECL_OBJLAST);
|
||||
asCALL_CDECL_OBJFIRST);
|
||||
Ensure(r >= 0);
|
||||
}
|
||||
void RegisterMoveTypes::RegisterMoveLibrary(asIScriptEngine* engine) {
|
||||
|
|
Loading…
Reference in New Issue