Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow shooting npcs #6075
Conversation
BevapDin
added some commits
Feb 9, 2014
This comment has been minimized.
This comment has been minimized.
|
While this certainly allows us to target and shoot at NPCs, it also causes the game to immedately crash whenever the bullet actually hits them. |
This comment has been minimized.
This comment has been minimized.
|
I can't reproduce this, tried it with several npcs at once, some hostile, some not. How did you trigger that crash? |
This comment has been minimized.
This comment has been minimized.
|
It happens almost every time I shoot an NPC and hit.
Windows 7 console, by the way. |
This comment has been minimized.
This comment has been minimized.
|
Turns out I had forgotten to change some calls to npc_at to the new return type, but that should only affect the tiles build and should result in a compile error. Seems I have to get hands on a windows machine. |
BevapDin commentedFeb 12, 2014
game::npc_atreturn the npc object directly (not the index ingame::active_npc)game::critter_atto get any kind of critter, be it a monster, a npc or the player, this should make many things easier, instead ofone can write
The function is currently only used in the projectile attack code, because the other code uses different functions for npc and monsters, those have not been ported to Creature.
Bug report here http://smf.cataclysmdda.com/index.php?topic=5324 should be fixed by this.
Fixes #6026
Superseded by #6091