mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
- Fixed some issues and crashes
- Simplified projectile handling. New creatures can now shoot.
This commit is contained in:
@ -284,10 +284,10 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
|
||||
BOOST_FOREACH(const CStack *s, stacks)
|
||||
{
|
||||
int creID = (s->getCreature()->idNumber == 149) ? CGI->creh->factionToTurretCreature[siegeH->town->town->typeID] : s->getCreature()->idNumber; //id of creature whose shots should be loaded
|
||||
if(s->getCreature()->isShooting() && vstd::contains(CGI->creh->idToProjectile, creID))
|
||||
if(s->getCreature()->isShooting())
|
||||
{
|
||||
CDefHandler *&projectile = idToProjectile[s->getCreature()->idNumber];
|
||||
projectile = CDefHandler::giveDef(CGI->creh->idToProjectile[creID]);
|
||||
projectile = CDefHandler::giveDef(s->getCreature()->projectile);
|
||||
|
||||
if(projectile->ourImages.size() > 2) //add symmetric images
|
||||
{
|
||||
|
Reference in New Issue
Block a user