Jump to content
Eternal Lands Official Forums
Sign in to follow this  
LabRat

Floating exp/char health (nnn/nnn) bug

Recommended Posts

Latest CVS (and previous ones)

 

When I get experience for harvesting the floating experience starts a long way above my character and rises.

 

The health text is misaligned with both the character's head and the name.

 

The screenshots below show both examples:

 

screenshoteternallands3vn2.th.jpg screenshoteternallands2cf2.th.jpg

 

Note that adko is guildless and that the position of his name is off centre to the left, and that all the health amounts are off to the right.

Share this post


Link to post
Share on other sites

Yes, I have noticed this too, I would guess this change with the exp msg height to be related to the new effect of the health increase where the number drop down and bounce, but I could be wrong. At least it has changed so your not alone=)

 

For the bar thing, well it has changed abit too lately, ttlanhil changed it so that no matter angle of camera the bars/names would face you and be the same size. (At least that's how I understood it from his explaination)

I guess it should be centered but you should try and enable the health bar:p

Share this post


Link to post
Share on other sites

It's known about. I posted previously that Emajekral was going to rewrite a bunch of code to fix this. I have a heap of code from him now, and I'll be going over it to start putting stuff into CVS. Please be patient.

As for the experience, it's actually not far above your head, if you're standing.

Share this post


Link to post
Share on other sites

I considered that but the health bar when switched on alone (alt-h alt-B ) centres above the head, and forces a 5 pixel move to the right for the health figures when they are both active.

 

When only the health figure is shown it should be aligned above the head.

 

I tried playing with emajekral's maths but trying to understand how it works is giving me a headache.

 

I can understand character_x+(string_pixel_width/2) to put the text in the correct place, but that code doesn't even come close to doing that :P

Edited by LabRat

Share this post


Link to post
Share on other sites
I tried playing with emajekral's maths but trying to understand how it works is giving me a headache.

His new stuff isn't in CVS yet. What was there I didn't think was his... I could be wrong.

 

Anyways, it was a nightmare and I was in the process of re-writing it, but found out he is already doing it so I stopped. His changes should be in sometime soon at which point we can iron out any remaining concerns about placement.

 

I do agree with the XP though some seems to be strangely located. We can check it once its all in CVS.

Share this post


Link to post
Share on other sites

Berlios actors.c - this is where I got the information that it is emaj's work

Revision 1.163 / (view) - annotate - [select for diffs] , Tue Jun 12 11:59:34 2007 UTC (5 days, 21 hours ago) by ttlanhil

Branch: MAIN

Changes since 1.162: +94 -52 lines

Diff to previous 1.162 [ Patch #1201 ] Fixes perspective on the little banners over characters (emajekral)

Share this post


Link to post
Share on other sites

That was from an old patch, which I put in before I knew he had resurfaced. He since has, and has given me his code; which I'll stick into CVS once I'm finished cleaning and checking.

Until then, if it's a problem you can try using an older version from CVS, or I can post the progress I've made on Emajekral's code (however there's no guarantee it'll even compile. Right now I'm just finishing off making a diff out of the complte source files he sent me, and I have other things like an University assignment to finish before I can get back to any EL code).

Share this post


Link to post
Share on other sites

Thanks for taking this on ttlanhil you RULE.

 

Here's a video of the corrected stuff you can all look at until it hits CVS: You Tube Rocks.

 

The corrections I mentioned in the video are:

 

in stats.c, this function:

void draw_floatingmessage(floating_message *message, float healthbar_z) {

 

change

		draw_ortho_ingame_string(x, y, 0, message->message, 1, font_scale*0.14, font_scale*0.21);

 

to

		draw_ortho_ingame_string(x, y, 0, message->message, 1, INGAME_FONT_X_LEN*font_scale, INGAME_FONT_Y_LEN*font_scale);

 

wherever it occurs (twice near the end of the function).

Edited by emajekral

Share this post


Link to post
Share on other sites

Okay, I've been through the code Emajekral sent me a few times; I've fixed some bugs, changed some things around, made it work with NEW_WEATHER, etc.

 

For those who want to test it, see:

https://developer.berlios.de/patch/index.ph...p;group_id=1256

That's against current CVS as of about now. You'll also need to extract http://users.on.net/~gingerman/sky_cursor-textures.zip into your datadir/textures folder.

 

To enable first person view (FPV): alt+f

To enable mouse-grab: alt+g

 

Note that it's not finished.

 

There are a number of problems; some of which I can fix, and some I can't.

Some of them I may have caused myself or may have been caused by the changes to CVS since Emajekral was actively working on this. I've fixed at least one segfault because of such changes.

 

The biggest problem is that this seems to have even more "Ooh, pretty! Okay, Ima sit here and watch and not be productive" factor than perhaps even karenrei's eyecandy. The rooftops in VotD and similar places will probably be crowded for a while as people look for vantage spots to watch the sunrise/sunset.

 

Bugs that I've seen/experienced:

- middle-click drag is funky, resetting itself to straight above, etc.

- alt+g, mouse-grab, doesn't seem to work correctly ATM. moving the mouse does move the view, but the mouse can leave the window. I can probably fix this with a few hours work, though.

- character slide, when the camera is moving. Not sure why.

- position of camera on mapload isn't where we start; and it shouldn't pan to the player on map entry.

- clouds, stars & sun go from north to south. funky.

- you can see parts of yourself when spinning the camera in FPV. Possibly because I was sitting, and an attempt to turn fails when sitting. Oh well. maybe we should hide the player's actor in FPV

 

TODOs and related issues:

- the lightning is seen on clouds (at least in -DNEW_WEATHER, where the flash is more noticeable), which isn't really going to be correct.

- the shadow system in EL only works for a certain distance; after that the shadows look funky. The new view here will make players more likely to be looking long distances, so it is becoming more of a problem.

- actor animations, when viewed from a low angle (such as horizontal) seem a lot more robotic, no bounce, etc.

- again with being able to see further, you can see when actors disappear. It might work okay if we alpha blend people out at a certain distance, because currently they just pop in/out on actor add/remove from the server.

 

And possibly other issues I haven't found yet.

 

Please test and report bugs... Even better, provide fixes :D

 

ed: Meh, wrong thread, I should have posted on the original thread. Oh well, it's close to being the right one :P

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Yup. It's stuff like that that kept me from committing. And levelling. I kept watching the stars, sun moon, clouds, etc. I currently do NOT recommend using alt-g to grab mouse. It hasn't been maintained since August last year. The correct way to grab and release is middle mouse. If you don't have one you're missing out.

 

For now some issues can be resolved by changing these lines in gl_init.c:

	if (!sdl_cursors)
{
	SDL_ShowCursor(0);
	SDL_WM_GrabInput(SDL_GRAB_ON);
}

 

to

if (!sdl_cursors)
{
	SDL_ShowCursor(0);
	SDL_WM_GrabInput(SDL_GRAB_OFF);
}

 

That block was a quick fix from just before I submitted and I got it wrong. (It's still wrong, just less so.)

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×