Skip to content
This repository has been archived by the owner. It is now read-only.

Stinger done #700

Merged
merged 5 commits into from Sep 1, 2020
Merged

Stinger done #700

merged 5 commits into from Sep 1, 2020

Conversation

@Sergeanur
Copy link
Collaborator

@Sergeanur Sergeanur commented Aug 31, 2020

Note: untested

@ghost
ghost approved these changes Aug 31, 2020
if (spikeSegment->m_entryInfoList.first != nil)
spikeSegment->bRemoveFromWorld = true;
else
delete spikeSegment;

This comment has been minimized.

@ghost

ghost Aug 31, 2020

pSpikes[i] could be nilled

This comment has been minimized.

@Sergeanur

Sergeanur Aug 31, 2020
Author Collaborator

Original code doesn't do that


pOwner = pPed;
for (i = 0; i < NUM_STINGER_SEGMENTS; i++) {
pSpikes[i] = new CStingerSegment;

This comment has been minimized.

@ghost

ghost Aug 31, 2020

new CStingerSegment();?

This comment has been minimized.

@Sergeanur

Sergeanur Aug 31, 2020
Author Collaborator

nah

// no break
case STINGERSTATE_STATE1:
if (m_nSpikeState != STINGERSTATE_STATE1 || CTimer::GetTimeInMilliseconds() <= m_nTimeOfDeploy + 2500) {
float something = (CTimer::GetTimeInMilliseconds() - m_nTimeOfDeploy) / 2500.0f;

This comment has been minimized.

This comment has been minimized.

@Sergeanur

Sergeanur Aug 31, 2020
Author Collaborator

ok

This comment has been minimized.

@aap

aap Aug 31, 2020
Member

I'd flip this if. and for something maybe interp or just t?

@@ -92,6 +93,7 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
m_nHassleTimer = 0;
field_61C = 0;
field_624 = 0;
m_pStinger = new CStinger;

This comment has been minimized.

This comment has been minimized.

@Sergeanur

Sergeanur Aug 31, 2020
Author Collaborator

also nah

// no break
case STINGERSTATE_STATE1:
if (m_nSpikeState != STINGERSTATE_STATE1 || CTimer::GetTimeInMilliseconds() <= m_nTimeOfDeploy + 2500) {
float something = (CTimer::GetTimeInMilliseconds() - m_nTimeOfDeploy) / 2500.0f;

This comment has been minimized.

@aap

aap Aug 31, 2020
Member

I'd flip this if. and for something maybe interp or just t?

src/objects/Stinger.h Outdated Show resolved Hide resolved
if (pAutomobile == nil && pBike == nil) continue;

int wheelId = 0;
float someWheelDist = sq(((CVehicleModelInfo*)CModelInfo::GetModelInfo(vehsInRange[i]->GetModelIndex()))->m_wheelScale);

This comment has been minimized.

@erorcun

erorcun Sep 1, 2020
Collaborator

not a good variable name


CVehicle *vehsInRange[16];
int16 numObjects;
CEntity someEntity;

This comment has been minimized.

@erorcun

erorcun Sep 1, 2020
Collaborator

this is unused (and not a good name anyway)

angle2 = CGeneral::LimitRadianAngle(angle2);

for (int spike = 0; spike < NUM_STINGER_SEGMENTS; spike++) {
CVector somePosAgain = pos3d + CVector(pos2d.x, pos2d.y, 0.6f);

This comment has been minimized.

@erorcun

erorcun Sep 1, 2020
Collaborator

again

@aap aap merged commit 0640ec7 into GTAmodding:miami Sep 1, 2020
14 checks passed
14 checks passed
@github-actions
build (win-amd64-librw_d3d9-oal, Debug)
Details
@github-actions
build (win-x86-librw_d3d9-mss, Debug)
Details
@github-actions
build (win-amd64-librw_d3d9-oal, Release)
Details
@github-actions
build (win-x86-librw_d3d9-mss, Release)
Details
@github-actions
build (win-amd64-librw_gl3_glfw-oal, Debug)
Details
@github-actions
build (win-x86-librw_gl3_glfw-mss, Debug)
Details
@github-actions
build (win-amd64-librw_gl3_glfw-oal, Release)
Details
@github-actions
build (win-x86-librw_gl3_glfw-mss, Release)
Details
@github-actions
build (win-x86-librw_d3d9-oal, Debug)
Details
@github-actions
build (win-x86-librw_d3d9-oal, Release)
Details
@github-actions
build (win-x86-librw_gl3_glfw-oal, Debug)
Details
@github-actions
build (win-x86-librw_gl3_glfw-oal, Release)
Details
@appveyor
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Sergeanur Sergeanur deleted the Sergeanur:VC/Stinger branch Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants