mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-16 17:24:08 +00:00
Fixes for melees and various things
This commit is contained in:
parent
fd4cd3e8f1
commit
2ab3fb5dd0
15 changed files with 297 additions and 196 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue