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

Zero divisor when advance throwing Chemlight (IR) #5207

Closed
Phyma opened this issue May 26, 2017 · 7 comments
Closed

Zero divisor when advance throwing Chemlight (IR) #5207

Phyma opened this issue May 26, 2017 · 7 comments
Assignees
Labels
Milestone

Comments

@Phyma
Copy link
Contributor

Phyma commented May 26, 2017

Arma 3 Version: Stable (stable / rc / dev)
CBA Version: 3.3 (stable / dev + commit hash)
ACE3 Version: 3.9.2 (stable / dev + commit hash)

Mods:

- CBA_A3
- ace

Description:

  • When advance throwing a Chemlight IR there is a zero divisor in fnc_exitThrowMode.sqf
    [QEGVAR(common,setShotParents), [_activeThrowable, _unit, (getShotParents _activeThrowable) select 1]] call CBA_fnc_serverEvent;

variable _activeThrowable is in weird form: 8d881600# 178009.
While others are on the form 1779997.
So getShotParents returns a blank array.

The variable is being distorted in fnc_prime here:


// Throw Fired XEH
[QGVAR(throwFiredXEH), [
    _unit, // unit
    "Throw", // weapon
    _muzzle, // muzzle
    _muzzle, // mode
    _throwableType, // ammo
    _throwableMag, // magazine
    _activeThrowable // projectile
]] call CBA_fnc_globalEvent;

Steps to reproduce:

  • Open editor
  • Spawn soldier with Chemlight IR
  • Start advance throwing them

Where did the issue occur?

  • Editor (Singleplayer)

Placed Modules:

  • None

RPT log file:

  • Add a link (gist or pastebin) to the client and/or server RPT file. An instruction to find your RPT files can be found here.
  • If possible at the time the bug is encountered, go to ACE Options and select "Debug To Clipboard", this will print extensive debug information to the RPT file.
@jonpas
Copy link
Member

jonpas commented May 27, 2017

This was introduced in #5052 it seems.

@jonpas jonpas self-assigned this May 27, 2017
@jonpas jonpas added this to the 3.10.0 milestone May 27, 2017
@Phyma
Copy link
Contributor Author

Phyma commented May 27, 2017

So CBA_fnc_addeventhandler is taking code as its second parameter.

Should it then be: _this call FUNC(throwFiredXEH) or just call FUNC(throwFiredXEH)?

Because now its just FUNC(throwFiredXEH)

@Phyma
Copy link
Contributor Author

Phyma commented May 27, 2017

Also is CBA_fnc_serverEvent still a thing? or should it be CBA_fnc_globalEvent.
https://github.com/acemod/ACE3/blob/master/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf#L37

@Phyma
Copy link
Contributor Author

Phyma commented May 27, 2017

#5209 possible fix, missing call

@Phyma
Copy link
Contributor Author

Phyma commented May 27, 2017

Hope you fix it with that. I still think its a mystery that QGVAR(activeThrowable) get changed in the global event:

prime.sqf
systemChat format ["Before globalevent getvar: %1",_unit getVariable [QGVAR(activeThrowable), objNull]];
// Throw Fired XEH
[QGVAR(throwFiredXEH), [
    _unit, // unit
    "Throw", // weapon
    _muzzle, // muzzle
    _muzzle, // mode
    _throwableType, // ammo
    _throwableMag, // magazine
    _activeThrowable // projectile
]] call CBA_fnc_globalEvent;
systemChat format ["After globalevent getvar: %1",_unit getVariable [QGVAR(activeThrowable), objNull]];

ExitThrowMode.sqf
systemChat format ["ExitThrowMode _activeThrowable: %1", _activeThrowable];

Picture of the logg:
https://drive.google.com/file/d/0B29KgFH6HzdIZ3JPNmNqak5HMDQ/view?usp=sharing

@PabstMirror
Copy link
Contributor

Take a look at https://github.com/acemod/ACE3/blob/master/addons/chemlights/functions/fnc_throwIR.sqf

It deletes the old grenade, creates a new one
then changes the variable back in advanced throwing.

@Phyma
Copy link
Contributor Author

Phyma commented May 27, 2017

Aa thanks.

That explains alot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants