This repository has been archived by the owner. It is now read-only.
Stinger done #700
Merged
Stinger done #700
+277
−0
Conversation
| if (spikeSegment->m_entryInfoList.first != nil) | ||
| spikeSegment->bRemoveFromWorld = true; | ||
| else | ||
| delete spikeSegment; |
ghost
Aug 31, 2020
pSpikes[i] could be nilled
pSpikes[i] could be nilled
Sergeanur
Aug 31, 2020
Author
Collaborator
Original code doesn't do that
Original code doesn't do that
|
|
||
| pOwner = pPed; | ||
| for (i = 0; i < NUM_STINGER_SEGMENTS; i++) { | ||
| pSpikes[i] = new CStingerSegment; |
ghost
Aug 31, 2020
new CStingerSegment();?
new CStingerSegment();?
Sergeanur
Aug 31, 2020
Author
Collaborator
nah
nah
src/objects/Stinger.cpp
Outdated
| // no break | ||
| case STINGERSTATE_STATE1: | ||
| if (m_nSpikeState != STINGERSTATE_STATE1 || CTimer::GetTimeInMilliseconds() <= m_nTimeOfDeploy + 2500) { | ||
| float something = (CTimer::GetTimeInMilliseconds() - m_nTimeOfDeploy) / 2500.0f; |
ghost
Aug 31, 2020
progress?
progress?
Sergeanur
Aug 31, 2020
Author
Collaborator
ok
ok
aap
Aug 31, 2020
Member
I'd flip this if. and for something maybe interp or just t?
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; | |||
ghost
Aug 31, 2020
also ()?
also ()?
Sergeanur
Aug 31, 2020
Author
Collaborator
also nah
also nah
src/objects/Stinger.cpp
Outdated
| // no break | ||
| case STINGERSTATE_STATE1: | ||
| if (m_nSpikeState != STINGERSTATE_STATE1 || CTimer::GetTimeInMilliseconds() <= m_nTimeOfDeploy + 2500) { | ||
| float something = (CTimer::GetTimeInMilliseconds() - m_nTimeOfDeploy) / 2500.0f; |
aap
Aug 31, 2020
Member
I'd flip this if. and for something maybe interp or just t?
I'd flip this if. and for something maybe interp or just t?
src/objects/Stinger.cpp
Outdated
| if (pAutomobile == nil && pBike == nil) continue; | ||
|
|
||
| int wheelId = 0; | ||
| float someWheelDist = sq(((CVehicleModelInfo*)CModelInfo::GetModelInfo(vehsInRange[i]->GetModelIndex()))->m_wheelScale); |
erorcun
Sep 1, 2020
Collaborator
not a good variable name
not a good variable name
src/objects/Stinger.cpp
Outdated
|
|
||
| CVehicle *vehsInRange[16]; | ||
| int16 numObjects; | ||
| CEntity someEntity; |
erorcun
Sep 1, 2020
Collaborator
this is unused (and not a good name anyway)
this is unused (and not a good name anyway)
src/objects/Stinger.cpp
Outdated
| angle2 = CGeneral::LimitRadianAngle(angle2); | ||
|
|
||
| for (int spike = 0; spike < NUM_STINGER_SEGMENTS; spike++) { | ||
| CVector somePosAgain = pos3d + CVector(pos2d.x, pos2d.y, 0.6f); |
erorcun
Sep 1, 2020
Collaborator
again
again
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Note: untested