- Merged two classes (cPopulation::cCreature and cTown::cCreature)
- Changes some C-strings to STL-strings - Fixed the problem where the spiderweb logo would not fully appear if ShowStartupSplash is disabled git-svn-id: http://openexile.googlecode.com/svn/trunk@54 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -425,10 +425,10 @@ bool monst_on_space(location loc,short m_num)
|
||||
|
||||
if (univ.town.monst.dudes[m_num].active == 0)
|
||||
return false;
|
||||
if ((loc.x - univ.town.monst.dudes[m_num].m_loc.x >= 0) &&
|
||||
(loc.x - univ.town.monst.dudes[m_num].m_loc.x <= univ.town.monst.dudes[m_num].m_d.x_width - 1) &&
|
||||
(loc.y - univ.town.monst.dudes[m_num].m_loc.y >= 0) &&
|
||||
(loc.y - univ.town.monst.dudes[m_num].m_loc.y <= univ.town.monst.dudes[m_num].m_d.y_width - 1))
|
||||
if ((loc.x - univ.town.monst.dudes[m_num].cur_loc.x >= 0) &&
|
||||
(loc.x - univ.town.monst.dudes[m_num].cur_loc.x <= univ.town.monst.dudes[m_num].m_d.x_width - 1) &&
|
||||
(loc.y - univ.town.monst.dudes[m_num].cur_loc.y >= 0) &&
|
||||
(loc.y - univ.town.monst.dudes[m_num].cur_loc.y <= univ.town.monst.dudes[m_num].m_d.y_width - 1))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
@@ -448,18 +448,18 @@ bool monst_can_be_there(location loc,short m_num)
|
||||
location destination;
|
||||
|
||||
// First clear monst away so it doesn't block itself
|
||||
univ.town.monst.dudes[m_num].m_loc.x += 100;
|
||||
univ.town.monst.dudes[m_num].cur_loc.x += 100;
|
||||
|
||||
for (i = 0; i < univ.town.monst.dudes[m_num].m_d.x_width; i++)
|
||||
for (j = 0; j < univ.town.monst.dudes[m_num].m_d.y_width; j++) {
|
||||
destination.x = loc.x + i; destination.y = loc.y + j;
|
||||
if ((is_blocked(destination) == true)
|
||||
|| (loc_off_act_area(destination) == true)) {
|
||||
univ.town.monst.dudes[m_num].m_loc.x -= 100;
|
||||
univ.town.monst.dudes[m_num].cur_loc.x -= 100;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
univ.town.monst.dudes[m_num].m_loc.x -= 100;
|
||||
univ.town.monst.dudes[m_num].cur_loc.x -= 100;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -470,8 +470,8 @@ bool monst_adjacent(location loc,short m_num)
|
||||
|
||||
for (i = 0; i < univ.town.monst.dudes[m_num].m_d.x_width; i++)
|
||||
for (j = 0; j < univ.town.monst.dudes[m_num].m_d.y_width; j++) {
|
||||
destination.x = univ.town.monst.dudes[m_num].m_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].m_loc.y + j;
|
||||
destination.x = univ.town.monst.dudes[m_num].cur_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].cur_loc.y + j;
|
||||
if (adjacent(destination,loc) == true)
|
||||
return true;
|
||||
}
|
||||
@@ -485,8 +485,8 @@ bool monst_can_see(short m_num,location l)
|
||||
|
||||
for (i = 0; i < univ.town.monst.dudes[m_num].m_d.x_width; i++)
|
||||
for (j = 0; j < univ.town.monst.dudes[m_num].m_d.y_width; j++) {
|
||||
destination.x = univ.town.monst.dudes[m_num].m_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].m_loc.y + j;
|
||||
destination.x = univ.town.monst.dudes[m_num].cur_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].cur_loc.y + j;
|
||||
if (can_see(destination,l,0) < 5)
|
||||
return true;
|
||||
}
|
||||
@@ -500,8 +500,8 @@ bool party_can_see_monst(short m_num)
|
||||
|
||||
for (i = 0; i < univ.town.monst.dudes[m_num].m_d.x_width; i++)
|
||||
for (j = 0; j < univ.town.monst.dudes[m_num].m_d.y_width; j++) {
|
||||
destination.x = univ.town.monst.dudes[m_num].m_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].m_loc.y + j;
|
||||
destination.x = univ.town.monst.dudes[m_num].cur_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].cur_loc.y + j;
|
||||
if (party_can_see(destination) < 6)
|
||||
return true;
|
||||
}
|
||||
@@ -515,8 +515,8 @@ bool can_see_monst(location l,short m_num)
|
||||
|
||||
for (i = 0; i < univ.town.monst.dudes[m_num].m_d.x_width; i++)
|
||||
for (j = 0; j < univ.town.monst.dudes[m_num].m_d.y_width; j++) {
|
||||
destination.x = univ.town.monst.dudes[m_num].m_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].m_loc.y + j;
|
||||
destination.x = univ.town.monst.dudes[m_num].cur_loc.x + i;
|
||||
destination.y = univ.town.monst.dudes[m_num].cur_loc.y + j;
|
||||
if (can_see(l,destination,0) < 5)
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user