Jump to content
Eternal Lands Official Forums
bluap

Problems with action cursros - actor changes related?

Recommended Posts

Using the latest CVS on Debian Linux. For the last day or so, I've noticed it that its is now very difficult, nigh on impossible in fact, to attack small creatures. Even rabbits and beavers are difficult and sometimes impossible. It varies a lot but it is very difficult to get the attack cursor. If you zoom in on your character and select the attack cursor, then move the cursor around your character, the attack cursor comes and goes in regions. Sometimes it activates anywhere on your person, other times only half your body activates the cursor. If you move or rotate and try again, most likely the active regions have changed. Finally, sometimes, the green/red target cursor does not appear where your click, but close by, other times its fine.

 

edit: forgot to mention, default build options with MISSILES defined.

edit 2: Just noticed this on mantis.

Edited by bluap

Share this post


Link to post
Share on other sites

I noticed the same too. I think it depends on bboxes. In function get_actors_in_range (actors.c) bbox is translated according to actor position but not rotated. I added this:

 

memcpy(&bbox, &actors_list->bbox, sizeof(AABBOX));

rotate_aabb(&bbox, actors_list->tmp.x_rot, actors_list->tmp.y_rot, 180.0f-actors_list->tmp.z_rot);

 

just before the VAdd(...) and it seems to work fine.

 

However i think bbox should not be used to determine actor->max_z (line 709) because this way banners are displayed at the highest z and during animations (fight ones) they jump, following mobs weapons like this (white lines are bboxes)

 

 

I'm not deep in this part of the client, however I suggest to use the zpos of "highest_bone" (defined in skeletons.c) to determine actor->max_z.

 

 

Hope this helps.

Edited by Fedora

Share this post


Link to post
Share on other sites

You can attack easier if you set on the option "background behind name" or something like that. When names are inside black half-transparent rectangle, you can attack simply by clicking the rectangle (so it isn't needed to click exactly on the letters of name or the model of the critter).

Share this post


Link to post
Share on other sites

You can attack easier if you set on the option "background behind name" or something like that. When names are inside black half-transparent rectangle, you can attack simply by clicking the rectangle (so it isn't needed to click exactly on the letters of name or the model of the critter).

Are you actually using the CVS build because your suggestion has no effect what so ever. Thanks anyway.

 

memcpy(&bbox, &actors_list->bbox, sizeof(AABBOX));

rotate_aabb(&bbox, actors_list->tmp.x_rot, actors_list->tmp.y_rot, 180.0f-actors_list->tmp.z_rot);

Adding that line does appear to help a bit but its still not consistent when you zoom and check your character. Looking at an older build and you can consistently get the attack cursor anywhere on your character. Thanks.

 

Edit: Doh, I didn't modify the code properly as you suggested, it probably did work. Anyway, I've just updated to the latest CVS including xaphier's changes and it appears to be fixed. The banner height looks better too.

Edited by bluap

Share this post


Link to post
Share on other sites

The problem is that the bounding box is not calculated every frame now, for speed reasons.

Ideally, we should use real collision detection for this purpose, the method we use now is very slow.

Share this post


Link to post
Share on other sites

The problem is that the bounding box is not calculated every frame now, for speed reasons.

Ideally, we should use real collision detection for this purpose, the method we use now is very slow.

 

Actually the latest commit by Xaphier calculate the bbox every frame (cal.c, line 455), and yes it is slow (and my hardware sucks too...)

 

 

@bluap: you sure that banners are fixed? i still have too high banners for some mobs (cycs, armed orcs...) and still the "jumping" problem during combat. Not sure, but could this depend on the way bbox are calculated? In build_actor_bounding_box (actor_init.cpp, line 590) we calculate bbox with cal3d functions and then we enlarge it by 25%...is there a reason for this?

Share this post


Link to post
Share on other sites

@bluap: you sure that banners are fixed? i still have too high banners for some mobs (cycs, armed orcs...) and still the "jumping" problem during combat. Not sure, but could this depend on the way bbox are calculated? In build_actor_bounding_box (actor_init.cpp, line 590) we calculate bbox with cal3d functions and then we enlarge it by 25%...is there a reason for this?

I didn't say they were fixed, just better. I agree they still look a bit high and I didn't have time this morning to check out more than just humans and rabbits. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×