Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update colshape and marker hit detection when attaching #1327

Merged
8 commits merged into from
Apr 5, 2020

Conversation

Lpsd
Copy link
Member

@Lpsd Lpsd commented Mar 27, 2020

Fixes #1317

@qaisjp
Copy link
Contributor

qaisjp commented Mar 27, 2020

does this fix markers too?

@Lpsd
Copy link
Member Author

Lpsd commented Mar 27, 2020

I haven't tested with markers - it's getting pretty late so I'll investigate that tomorrow.

@Lpsd
Copy link
Member Author

Lpsd commented Mar 28, 2020

I've implemented this for markers too (it had the same issue as colshapes).

Copy link
Contributor

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@qaisjp
Copy link
Contributor

qaisjp commented Mar 28, 2020

have you tried overloading AttachTo? it's being called 2 lines above your additions

qaisjp@EdinburPro: ~/Documents/mtasa-blue git:(master) ✗
➜ ag "void AttachTo"
Server/mods/deathmatch/logic/CBlip.h
33:    void AttachTo(CElement* pElement);

Client/mods/deathmatch/logic/CClientPickup.h
109:    void AttachTo(CClientEntity* pEntity) override;

Client/mods/deathmatch/logic/CClientObject.h
51:    void AttachTo(CClientEntity* pEntity) override;




qaisjp@EdinburPro: ~/Documents/mtasa-blue git:(master) ✗
➜ ag "::AttachTo"
Server/mods/deathmatch/logic/CBlip.cpp
162:void CBlip::AttachTo(CElement* pElement)
164:    CElement::AttachTo(pElement);

Server/mods/deathmatch/logic/CElement.cpp
1080:void CElement::AttachTo(CElement* pElement)

Client/mods/deathmatch/logic/CClientPickup.cpp
95:void CClientPickup::AttachTo(CClientEntity* pEntity)
97:    CClientEntity::AttachTo(pEntity);

Client/mods/deathmatch/logic/CClientCamera.cpp
292:void CClientCamera::AttachTo(CElement* pElement)
301:    CClientEntity::AttachTo(pElement);

Client/mods/deathmatch/logic/CClientObject.cpp
177:void CClientObject::AttachTo(CClientEntity* pEntity)
179:    CClientEntity::AttachTo(pEntity);

Client/mods/deathmatch/logic/CClientEntity.cpp
605:void CClientEntity::AttachTo(CClientEntity* pEntity)

@Lpsd
Copy link
Member Author

Lpsd commented Mar 28, 2020

I've changed the implementation as suggested.

@ghost ghost changed the title Update colshape hit detection when attaching Update colshape and marker hit detection when attaching Mar 30, 2020
@ghost ghost self-requested a review March 30, 2020 10:53
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! @qaisjp looks good. Should we merge it?

@Lpsd
Copy link
Member Author

Lpsd commented Mar 30, 2020

@saml1er there's a problem with a crash upon exiting MTA which seems to have been introduced by these changes. I'm still investigating - see below:

Version = 1.5.7-custom.0.000
Time = Sat Mar 28 01:59:43 2020
Module = C:\Users\Ryan\Documents\GitHub\mtasa-blue\Bin\mods\deathmatch\client.dll
Code = 0xC0000005
Offset = 0x0004CCE5

EAX=00000000  EBX=1A3B6901  ECX=00000000  EDX=00000000  ESI=2680EB58
EDI=2669A3C0  EBP=0177F280  ESP=0177F280  EIP=7BCACCE5  FLG=00210246
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

@qaisjp qaisjp added the bug Something isn't working label Mar 30, 2020
@qaisjp qaisjp added this to the 1.6 milestone Mar 30, 2020
@Lpsd
Copy link
Member Author

Lpsd commented Apr 5, 2020

I've fixed the crash mentioned above with the latest commit. Ready to go.

Copy link
Contributor

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ghost ghost merged commit 3b95ff4 into multitheftauto:master Apr 5, 2020
qaisjp added a commit to qaisjp/mtasa-blue that referenced this pull request Sep 13, 2020
- Reverts "Fix crash from multitheftauto#1363 (multitheftauto#1364)" (fee420d).
- Reverts "Update colshape and marker hit detection when attaching (multitheftauto#1327)" (3b95ff4).
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collision positions for colshapes are not updated when attached to an element
2 participants