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

Lightning can now be fired from traps manually #3211

Merged
merged 15 commits into from May 12, 2024

Conversation

AdamPlenty
Copy link
Contributor

Fixes #3210

external_activate_trap_shot_at_angle(thing, player->acamera->orient_a, thing_get(player->hand_thing_idx));
struct TrapStats* trapstat = &game.conf.trap_stats[thing->model];
shotst = get_shot_model_stats(trapstat->created_itm_model);
struct Thing* trgtng = ((shotst->model_flags & ShMF_Boulder) != 0) ? INVALID_THING : get_nearest_enemy_creature_in_sight_and_range_of_trap(thing);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you hardcoded it on the shot model, that is not so very nice. Would this not be a lot better to link to TriggerType 1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I'm reading it I think it's coded with the Boulder property, not the shot model, isn't?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I'm reading it I think it's coded with the Boulder property, not the shot model, isn't?

Yes, it's the Boulder model flag, not the model itself.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, indeed better. But still begs the question what we want for the other 90-degree triggered traps, of which by default there are none,...

Would be nice I think if at least it looks in the correct general direction you slap in for the 90-degree angles, or do you disagree?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've no idea how that can be done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will test it like this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdamPlenty I pushed a commit putting all the power in the hands of the mapmaker. How is that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdamPlenty I pushed a commit putting all the power in the hands of the mapmaker. How is that?

It doesn't work :(. I cannot slap traps whose Slappable is set to 2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does

@Loobinex Loobinex merged commit 2d2a892 into dkfans:master May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SHOT_LIGHTNING does not shoot properly when fired from a manually triggered trap.
3 participants