hkzorman / advanced_npc

Advanced NPC for Minetest, using mobs_redo API
Other
17 stars 5 forks source link

Flag freeze is wrong #34

Closed BrunoMine closed 6 years ago

BrunoMine commented 6 years ago

The flag is being used inversely to the real. Look at the snippets: https://github.com/hkzorman/advanced_npc/blob/master/npc.lua#L481 https://github.com/tenplus1/mobs_redo/blob/master/api.lua#L2581

hkzorman commented 6 years ago

Yes, this can be changed. However it will require changes in many places and have to be done carefully.

What would you prefer, to change the variable name?

I will leave this open until I get to work on this.

BrunoMine commented 6 years ago

If this really is completely reversed, you just have to reverse its meaning, however if you really believed what is described in the code, then it is possible that there are errors in your code, and you will need to revise it.

hkzorman commented 6 years ago

I'm 100% conscious that the flag is reverse used, so in terms of logic I'm fairly sure there are no issues. I think I will rename it to self.unfreeze, that way will be consistent with the assignments.

Makes sense?

BrunoMine commented 6 years ago

Yes, it is ok!