PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Bug in timedScripts

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports
Display posts from previous:   

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 523

PostPosted: Thu Nov 01, 2007 3:56 am    Post subject: Bug in timedScripts Reply with quote

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

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 523

PostPosted: Sat Nov 03, 2007 8:19 am    Post subject: Reply with quote

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.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty