- [FIX] No es podia entrar al editor de bitmap_pos des de l'editor

- [FIX] Recreativa afegida
- [NEW] Prologo acabat
- [FIX] Quan s'acava el boost de invulnerabilitat se moria
This commit is contained in:
2024-10-10 09:33:56 +02:00
parent cabbb52cbb
commit ec7ac7114e
18 changed files with 187 additions and 7 deletions

View File

@@ -1062,7 +1062,7 @@ namespace actor
vec3_t min = room::getMin();
vec3_t max = room::getMax();
if ((act->push & PUSH_KILL) && (act->flags & FLAG_HERO))
if ((act->push & PUSH_KILL) && (act->flags & FLAG_HERO) && (!hero::hasBoostGod()))
{
if (!editor::isDevMode())
{
@@ -1091,6 +1091,8 @@ namespace actor
return;
}
if ((act->flags & FLAG_HERO) && (hero::hasBoostGod())) act->push &= ~PUSH_KILL;
// [RZC 26/09/2024] Hack usant react_push en el moviment RAND per a contar la distancia abans de canviar de direcció
if (act->movement == MOV_RAND)
{
@@ -1979,6 +1981,7 @@ namespace actor
bool dead = false;
bool prologo = false;
int prologo_objects[4] = {PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL, PROLOGO_OBJECT_INITIAL};
int num_prologo_objects=0;
void setPrologo(const bool value)
{
@@ -2014,6 +2017,7 @@ namespace actor
skills = SKILL_NONE;
if (prologo) skills &= SKILL_SHOES;
for (int i=0;i<4;++i) prologo_objects[i] = PROLOGO_OBJECT_INITIAL;
num_prologo_objects=0;
parts = PART_NONE;
for (int i = 0; i < 10; ++i)
anbernics[i] = false;
@@ -2052,8 +2056,8 @@ namespace actor
{
return dead;
}
const int getBoosterFromString(const char *booster)
{
static const char *boostset_name[4] = {"RUN", "GOD", "JUMP", "LIVE"};
for (int i = 0; i < 4; ++i)
@@ -2160,6 +2164,11 @@ namespace actor
boost_jumps--;
}
const bool hasBoostGod()
{
return boost_god > 0;
}
const int getSkillFromString(char *skill)
{
static const char *skillset_name[4] = {"SHOES", "GLOVES", "PANTS", "BAG"};
@@ -2309,6 +2318,7 @@ namespace actor
void leavePrologoObject(int which)
{
prologo_objects[which] = PROLOGO_OBJECT_LEFT;
num_prologo_objects++;
}
const bool isCarryingPrologoObject()
@@ -2322,6 +2332,11 @@ namespace actor
return prologo_objects[which];
}
const int getNumPrologoObjectsDone()
{
return num_prologo_objects;
}
void move(int *x, int *y, int *z)
{
actor_t *hero = actor::find("HERO");