mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 15:26:19 +00:00
Fixes for melees and various things
This commit is contained in:
@ -1017,6 +1017,25 @@ CPickups::RenderPickUpText()
|
||||
NumMessages = 0;
|
||||
}
|
||||
|
||||
void
|
||||
CPickups::CreateSomeMoney(CVector pos, int money)
|
||||
{
|
||||
bool found;
|
||||
|
||||
int pickupCount = Min(money / 20 + 1, 7);
|
||||
int moneyPerPickup = money / pickupCount;
|
||||
|
||||
for (int i = 0; i < pickupCount; i++) {
|
||||
// (CGeneral::GetRandomNumber() % 256) * PI / 128 gives a float up to something TWOPI-ish.
|
||||
pos.x += 1.5f * Sin((CGeneral::GetRandomNumber() % 256) * PI / 128);
|
||||
pos.y += 1.5f * Cos((CGeneral::GetRandomNumber() % 256) * PI / 128);
|
||||
pos.z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, &found) + 0.5f;
|
||||
if (found) {
|
||||
CPickups::GenerateNewOne(CVector(pos.x, pos.y, pos.z), MI_MONEY, PICKUP_MONEY, moneyPerPickup + (CGeneral::GetRandomNumber() & 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CPickups::Load(uint8 *buf, uint32 size)
|
||||
{
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
static bool GivePlayerGoodiesWithPickUpMI(int16 modelIndex, int playerIndex);
|
||||
static bool TestForPickupsInBubble(CVector pos, float range);
|
||||
static bool TryToMerge_WeaponType(CVector pos, eWeaponType weapon, uint8 type, uint32 quantity, bool unused);
|
||||
static void CreateSomeMoney(CVector, int);
|
||||
static void Load(uint8 *buf, uint32 size);
|
||||
static void Save(uint8 *buf, uint32 *size);
|
||||
|
||||
|
@ -232,7 +232,7 @@ enum {
|
||||
MAX_NUM_INTRO_RECTANGLES = 16,
|
||||
MAX_NUM_SCRIPT_SRPITES = 16,
|
||||
MAX_NUM_SCRIPT_SPHERES = 16,
|
||||
MAX_NUM_USED_OBJECTS = 200,
|
||||
MAX_NUM_USED_OBJECTS = 220,
|
||||
MAX_NUM_MISSION_SCRIPTS = 120,
|
||||
MAX_NUM_BUILDING_SWAPS = 25,
|
||||
MAX_NUM_INVISIBILITY_SETTINGS = 20,
|
||||
|
@ -145,10 +145,7 @@ CTrafficLights::ScanForLightsOnMap(void)
|
||||
CPtrList &list = CWorld::GetSector(x, y)->m_lists[ENTITYLIST_DUMMIES];
|
||||
for(node = list.first; node; node = node->next){
|
||||
CEntity *light = (CEntity*)node->item;
|
||||
if(light->GetModelIndex() != MI_TRAFFICLIGHTS &&
|
||||
light->GetModelIndex() != MI_TRAFFICLIGHTS_VERTICAL &&
|
||||
light->GetModelIndex() != MI_TRAFFICLIGHTS_MIAMI &&
|
||||
light->GetModelIndex() != MI_TRAFFICLIGHTS_TWOVERTICAL)
|
||||
if (!IsTrafficLight(light->GetModelIndex()))
|
||||
continue;
|
||||
|
||||
// Check cars
|
||||
|
Reference in New Issue
Block a user