View Issue Details

IDProjectCategoryView StatusLast Update
0000525Gameplay + OpenGL[All Projects] Bugpublic2017-04-02 12:23
ReporterMajor Cooke 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000525: AddEventHandlers + EventHandlers mixed up
DescriptionAddEventHandler appears to be replacing event handlers instead of adding onto them, while EventHandlers allows adding onto the current event handlers instead of replacing.
Steps To ReproduceLoad the attached file, start a new game.

Type this in console: netevent sayhi

It should say:
OHAI
HALLO


But it only says:
HALLO

-----

Open up test.pk3 and change the two AddEventHandlers in MAPINFO to just EventHandlers. Loading the game up again will produce the exact opposite results.
TagsNo tags attached.

Relationships

Activities

Major Cooke

Major Cooke

2017-04-02 11:33

reporter  

test.pk3 (436 bytes)
Major Cooke

Major Cooke

2017-04-02 11:47

reporter   ~0001212

Made a fix for it.
ZZYZX

ZZYZX

2017-04-02 11:47

reporter   ~0001213

There's broken true/false in these lines, which reverses the behavior.

        GAMEINFOKEY_STRINGARRAY(EventHandlers, "addeventhandlers", 0, true)
        GAMEINFOKEY_STRINGARRAY(EventHandlers, "eventhandlers", 0, false)

Flipping it should fix that. Sorry, late night coding.
Major Cooke

Major Cooke

2017-04-02 11:48

reporter   ~0001214

Well ahead of you with a PR. :P

Issue History

Date Modified Username Field Change
2017-04-02 11:33 Major Cooke New Issue
2017-04-02 11:33 Major Cooke File Added: test.pk3
2017-04-02 11:47 Major Cooke Note Added: 0001212
2017-04-02 11:47 ZZYZX Note Added: 0001213
2017-04-02 11:48 Major Cooke Note Added: 0001214
2017-04-02 12:23 Graf Zahl Status new => resolved
2017-04-02 12:23 Graf Zahl Resolution open => fixed