PenUltima Online

It is currently Thu Aug 28, 2008 9:41 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Bug in timedScripts
PostPosted: Wed Oct 31, 2007 11:56 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 538
TS_GetTimerDuration
This function is meant to get the remaining duration on a timer.
It does this by getting the timer struct and finding the .endtime on it and deducting the readgameclock() value.

It calls TS_GetTimerInfo to get the struct.
This function gets the info from the cprop on the player.

The cprop contains the following:
name
duration
level

It doesn't contain endtime.

Endtime only exists in the timer itself, it's not saved to cprops and is a calculation of duration + readgameclock().

However, the cprop is updated every second with the timer info, so TS_GetTimerDuration could simply:
return (timer.duration);
instead of
return (timer.endtime - ReadGameClock());

Can someone please check this for me before I submit it as a distro bugfix


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 4:19 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 538
Hmm,
That fix seems to work, but not for functions TargetEX and TargetCoordinatesEX.

Muad Dib - you fixed TargetEX function before, can you figure out why a fixed function actually breaks yours? I am going around in circles.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl