Curation round 16: Mom's Knife and the bone club, sin minibosses and death rewards, slots and beggars, NPC rendering and twelve bosses, alt path visuals, the Forgotten's flight and tainted HUDs, Sheol and the Cathedral to the credits, familiars and transformations
This commit is contained in:
1 parent
76c594f9a0
commit
e9de039d0f
151 files changed
+14996
-5208
No files matched your search
+22
-3
@@ -1,5 +1,6 @@
|
||||
#include "entity.h"
|
||||
#include "entity_effect.h"
|
||||
#include "entity_familiar.h"
|
||||
#include "entity_list.h"
|
||||
#include "entity_npc.h"
|
||||
#include "entity_player.h"
|
||||
@@ -9,6 +10,7 @@
|
||||
#include "lua_engine.h"
|
||||
#include "manager.h"
|
||||
#include "room.h"
|
||||
#include "room_grid.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdarg>
|
||||
@@ -485,6 +487,14 @@ void Entity::CopyStatusEffects()
|
||||
}
|
||||
}
|
||||
|
||||
// Sorted insertion into a hit list, as the entities keep them.
|
||||
void hit_list_insert(std::vector<uint32_t>& hitList, Entity& entity)
|
||||
{
|
||||
uint32_t index = entity.GetHitListIndex();
|
||||
auto at = std::lower_bound(hitList.begin(), hitList.end(), index);
|
||||
if (at == hitList.end() || *at != index) hitList.insert(at, index);
|
||||
}
|
||||
|
||||
// 006b62b0 The index hits on it are recorded under: its body's for segmented bosses that share them.
|
||||
uint32_t Entity::GetHitListIndex()
|
||||
{
|
||||
@@ -592,10 +602,19 @@ bool Entity::CanDevolve()
|
||||
return config && !config->devolve.empty();
|
||||
}
|
||||
|
||||
// 006b9740
|
||||
bool Entity::IsPlayerInRadius(const Vector&, float)
|
||||
// 006b9740 Whether a player (or Isaac's Heart) is within radius of a position. A friendly entity never sees one.
|
||||
bool Entity::IsPlayerInRadius(const Vector& center, float radius)
|
||||
{
|
||||
reconstruction_missing("Entity::IsPlayerInRadius 006b9740");
|
||||
if (IsFriendly() || radius <= 0) return false;
|
||||
|
||||
for (Entity_Player* player : g_game->playerManager.playerList)
|
||||
{
|
||||
Vector delta = vector_make(center.x - player->pos.x, center.y - player->pos.y);
|
||||
if (delta.x * delta.x + delta.y * delta.y < radius * radius) return true;
|
||||
}
|
||||
for (Entity* entity : entity_query_radius(center, radius, QUERY_FAMILIARS))
|
||||
if (entity->type == ENTITY_FAMILIAR && entity->variant == Entity_Familiar::ISAACS_HEART) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 007e9130 The boss id its config gives, 0 without one.
|
||||
|
||||
Reference in new issue
Block a user