diff options
author | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-19 20:56:42 +0200 |
commit | bdbe5d1080066073f063d653e80df6dbf4b326a2 (patch) | |
tree | bc4f8fd0f648bc38789591efe73d661ed2981998 /src/control | |
parent | Merge pull request #564 from Xinerki/miami (diff) | |
download | re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.gz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.bz2 re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.lz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.xz re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.tar.zst re3-bdbe5d1080066073f063d653e80df6dbf4b326a2.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/Pickups.cpp | 73 | ||||
-rw-r--r-- | src/control/Script.cpp | 17 | ||||
-rw-r--r-- | src/control/TrafficLights.cpp | 5 |
3 files changed, 13 insertions, 82 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 01a28193..86ae4440 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -1148,45 +1148,6 @@ CPacManPickups::Update() void CPacManPickups::GeneratePMPickUps(CVector pos, float scrambleMult, int16 count, uint8 type) { - int i = 0; - while (count > 0) { - while (aPMPickUps[i].m_eType != PACMAN_NONE) - i++; - - bool bPickupCreated = false; - while (!bPickupCreated) { - CVector newPos = pos; - CColPoint colPoint; - CEntity *pRoad; - uint16 nRand = CGeneral::GetRandomNumber(); - newPos.x += ((nRand & 0xFF) - 128) * scrambleMult / 128.0f; - newPos.y += (((nRand >> 8) & 0xFF) - 128) * scrambleMult / 128.0f; - newPos.z = 1000.0f; - if (CWorld::ProcessVerticalLine(newPos, -1000.0f, colPoint, pRoad, true, false, false, false, true, false, nil) && pRoad->IsBuilding() && ((CBuilding*)pRoad)->GetIsATreadable()) { - newPos.z = 0.7f + colPoint.point.z; - aPMPickUps[i].m_eType = type; - aPMPickUps[i].m_vecPosn = newPos; - CObject *obj = new CObject(MI_BULLION, true); - if (obj != nil) { - obj->ObjectCreatedBy = MISSION_OBJECT; - obj->SetPosition(aPMPickUps[i].m_vecPosn); - obj->SetOrientation(0.0f, 0.0f, -HALFPI); - obj->GetMatrix().UpdateRW(); - obj->UpdateRwFrame(); - - obj->bAffectedByGravity = false; - obj->bExplosionProof = true; - obj->bUsesCollision = false; - obj->bIsPickup = false; - CWorld::Add(obj); - } - aPMPickUps[i].m_pObject = obj; - bPickupCreated = true; - } - } - count--; - } - bPMActive = true; } // diablo porn mission pickups @@ -1303,40 +1264,6 @@ static const CVector aRacePoints1[] = { void CPacManPickups::GeneratePMPickUpsForRace(int32 race) { - const CVector *pPos = nil; - int i = 0; - - if (race == 0) pPos = aRacePoints1; // there's only one available - assert(pPos != nil); - - while (!pPos->IsZero()) { - while (aPMPickUps[i].m_eType != PACMAN_NONE) - i++; - - aPMPickUps[i].m_eType = PACMAN_RACE; - aPMPickUps[i].m_vecPosn = *(pPos++); - if (race == 0) { - CObject* obj = new CObject(MI_DONKEYMAG, true); - if (obj != nil) { - obj->ObjectCreatedBy = MISSION_OBJECT; - - obj->SetPosition(aPMPickUps[i].m_vecPosn); - obj->SetOrientation(0.0f, 0.0f, -HALFPI); - obj->GetMatrix().UpdateRW(); - obj->UpdateRwFrame(); - - obj->bAffectedByGravity = false; - obj->bExplosionProof = true; - obj->bUsesCollision = false; - obj->bIsPickup = false; - - CWorld::Add(obj); - } - aPMPickUps[i].m_pObject = obj; - } else - aPMPickUps[i].m_pObject = nil; - } - bPMActive = true; } void diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 2ad1e9de..cc5c698b 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -7167,12 +7167,13 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) } case COMMAND_CREATE_FLOATING_PACKAGE: { - CollectParameters(&m_nIp, 3); - CVector pos = *(CVector*)&ScriptParams[0]; - if (pos.z <= MAP_Z_LOW_LIMIT) - pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; - ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0); - StoreParameters(&m_nIp, 1); +// removed in MIAMI +// CollectParameters(&m_nIp, 3); +// CVector pos = *(CVector*)&ScriptParams[0]; +// if (pos.z <= MAP_Z_LOW_LIMIT) +// pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y) + PICKUP_PLACEMENT_OFFSET; +// ScriptParams[0] = CPickups::GenerateNewOne(pos, MI_FLOATPACKAGE1, PICKUP_FLOATINGPACKAGE, 0); +// StoreParameters(&m_nIp, 1); return 0; } case COMMAND_PLACE_OBJECT_RELATIVE_TO_CAR: @@ -8626,8 +8627,8 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) return 0; } case COMMAND_GET_BODY_CAST_HEALTH: - ScriptParams[0] = CObject::nBodyCastHealth; - StoreParameters(&m_nIp, 1); + // ScriptParams[0] = CObject::nBodyCastHealth; + // StoreParameters(&m_nIp, 1); return 0; case COMMAND_SET_CHARS_CHATTING: { diff --git a/src/control/TrafficLights.cpp b/src/control/TrafficLights.cpp index 500d6af2..b1816936 100644 --- a/src/control/TrafficLights.cpp +++ b/src/control/TrafficLights.cpp @@ -145,7 +145,10 @@ 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) + if(light->GetModelIndex() != MI_TRAFFICLIGHTS && + light->GetModelIndex() != MI_TRAFFICLIGHTS_VERTICAL && + light->GetModelIndex() != MI_TRAFFICLIGHTS_MIAMI && + light->GetModelIndex() != MI_TRAFFICLIGHTS_TWOVERTICAL) continue; // Check cars |