mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 07:29:07 +00:00
- Fixed a bug with aura rendering that was causing a crash when rendering auras that were added to a unit after its creation (initAuraData was not called on subsequent AddAura calls). This caused objects like Settlements, Mills, Farmsteads and Temples to crash when you mouseover them since they do not gain the aura until construction is complete.
- When the map contains no territories, ignore territory-related building placement rules. Fixes #149. This was SVN commit r4349.
This commit is contained in:
@@ -559,6 +559,8 @@ jsval CEntity::AddAura( JSContext* cx, uintN argc, jsval* argv )
|
||||
}
|
||||
m_auras[name] = new CAura( cx, this, name, radius, tickRate, color, handler );
|
||||
|
||||
initAuraData();
|
||||
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
@@ -571,6 +573,9 @@ jsval CEntity::RemoveAura( JSContext* UNUSED(cx), uintN argc, jsval* argv )
|
||||
delete m_auras[name];
|
||||
m_auras.erase(name);
|
||||
}
|
||||
|
||||
initAuraData();
|
||||
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user