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

TransformToNode gives nonsense position #552

Closed
erorcun opened this issue May 16, 2020 · 1 comment
Closed

TransformToNode gives nonsense position #552

erorcun opened this issue May 16, 2020 · 1 comment
Labels

Comments

@erorcun
Copy link
Collaborator

@erorcun erorcun commented May 16, 2020

in CPed::Attack,

        firePos = ourWeapon->m_vecFireOffset;

        // TODO(Miami): Katana & Chainsaw
        if (ourWeapon->m_eWeaponFire == WEAPON_FIRE_MELEE) {
            firePos = GetMatrix() * firePos;
        } else {
            // TODO(Miami): Remove ANIM_KICK_FLOOR when fighting is done
            TransformToNode(firePos, (weaponAnimAssoc->animId == ANIM_KICK_FLOOR ||
                weaponAnimAssoc->animId == ANIM_MELEE_ATTACK_2ND && ourWeapon->m_AnimToPlay == ASSOCGRP_UNARMED) ? PED_FOOTR : PED_HANDR);
        }

TransformToNode in here returned -599926912., -599926912., -599926912. and crashed the game

happened to me twice, seems like reproducible if you play the game enough

@erorcun erorcun added the miami label May 16, 2020
@erorcun
Copy link
Collaborator Author

@erorcun erorcun commented May 18, 2020

fixed

@erorcun erorcun closed this May 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant