Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] what is the reason for making Update return timePassed?

[DiscordArchive] what is the reason for making Update return timePassed?

[DiscordArchive] what is the reason for making Update return timePassed?

Pages (4): Previous 1 2 3 4 Next
rektbyfaith
Administrator
0
06-11-2024, 06:07 PM
#21
Archived author: Northstrider • Posted: 2024-06-11T18:07:59.290000+00:00
Original source

so instead of timer = next_tick_timer we gotta do timer += next_tick_timer
rektbyfaith
06-11-2024, 06:07 PM #21

Archived author: Northstrider • Posted: 2024-06-11T18:07:59.290000+00:00
Original source

so instead of timer = next_tick_timer we gotta do timer += next_tick_timer

rektbyfaith
Administrator
0
06-11-2024, 06:08 PM
#22
Archived author: Tea • Posted: 2024-06-11T18:08:01.283000+00:00
Original source

(that is, dont while())
rektbyfaith
06-11-2024, 06:08 PM #22

Archived author: Tea • Posted: 2024-06-11T18:08:01.283000+00:00
Original source

(that is, dont while())

rektbyfaith
Administrator
0
06-11-2024, 06:08 PM
#23
Archived author: Northstrider • Posted: 2024-06-11T18:08:10.852000+00:00
Original source

so timer.HasPassed() will be triggered in two ticks when checked
rektbyfaith
06-11-2024, 06:08 PM #23

Archived author: Northstrider • Posted: 2024-06-11T18:08:10.852000+00:00
Original source

so timer.HasPassed() will be triggered in two ticks when checked

rektbyfaith
Administrator
0
06-11-2024, 06:09 PM
#24
Archived author: Northstrider • Posted: 2024-06-11T18:09:24.067000+00:00
Original source

but then there is this include in object.h topic again. we need to forward that stuff. alternatively this would be a first great spot to build a util module that can be imported
rektbyfaith
06-11-2024, 06:09 PM #24

Archived author: Northstrider • Posted: 2024-06-11T18:09:24.067000+00:00
Original source

but then there is this include in object.h topic again. we need to forward that stuff. alternatively this would be a first great spot to build a util module that can be imported

rektbyfaith
Administrator
0
06-11-2024, 06:10 PM
#25
Archived author: Tea • Posted: 2024-06-11T18:10:06.294000+00:00
Original source

anyway the proposed SimpleIntervalTimer "does the right thing" here
rektbyfaith
06-11-2024, 06:10 PM #25

Archived author: Tea • Posted: 2024-06-11T18:10:06.294000+00:00
Original source

anyway the proposed SimpleIntervalTimer "does the right thing" here

rektbyfaith
Administrator
0
06-11-2024, 06:13 PM
#26
Archived author: Takenbacon • Posted: 2024-06-11T18:13:04.833000+00:00
Original source

and it's another reason why it's important to pass the actual diff time rather than interval
rektbyfaith
06-11-2024, 06:13 PM #26

Archived author: Takenbacon • Posted: 2024-06-11T18:13:04.833000+00:00
Original source

and it's another reason why it's important to pass the actual diff time rather than interval

rektbyfaith
Administrator
0
06-11-2024, 06:13 PM
#27
Archived author: Takenbacon • Posted: 2024-06-11T18:13:41.033000+00:00
Original source

i vaguely recall an issue with wintergrasp timers because of that, they will drift over time because of something similar
rektbyfaith
06-11-2024, 06:13 PM #27

Archived author: Takenbacon • Posted: 2024-06-11T18:13:41.033000+00:00
Original source

i vaguely recall an issue with wintergrasp timers because of that, they will drift over time because of something similar

rektbyfaith
Administrator
0
06-11-2024, 06:21 PM
#28
Archived author: Tea • Posted: 2024-06-11T18:21:57.074000+00:00
Original source

unfortunately your implementation is not good either (i would say its actually way worse)
rektbyfaith
06-11-2024, 06:21 PM #28

Archived author: Tea • Posted: 2024-06-11T18:21:57.074000+00:00
Original source

unfortunately your implementation is not good either (i would say its actually way worse)

rektbyfaith
Administrator
0
06-11-2024, 06:24 PM
#29
Archived author: Takenbacon • Posted: 2024-06-11T18:24:03.548000+00:00
Original source

I probably made a mistake, I haven't got around to testing it lol
rektbyfaith
06-11-2024, 06:24 PM #29

Archived author: Takenbacon • Posted: 2024-06-11T18:24:03.548000+00:00
Original source

I probably made a mistake, I haven't got around to testing it lol

rektbyfaith
Administrator
0
06-11-2024, 06:25 PM
#30
Archived author: Tea • Posted: 2024-06-11T18:25:12.315000+00:00
Original source

for simplicity lets say you have a timer ticking every 2 seconds and you are using it to feed another timer like weather update code

if you now get a lag spike where the diff is 5 seconds then this will happen after the spike
1st tick subtracts 2s off m_timer (3s remains) but returns 5s - you advance weather internal timer by 5s
2nd world tick happens at normal rate, removing 2s off m_timer again (1s remains) and returns 3s - you advance weather internal timer by 3s

you ended up advancing internal weather timer by 8s instead
rektbyfaith
06-11-2024, 06:25 PM #30

Archived author: Tea • Posted: 2024-06-11T18:25:12.315000+00:00
Original source

for simplicity lets say you have a timer ticking every 2 seconds and you are using it to feed another timer like weather update code

if you now get a lag spike where the diff is 5 seconds then this will happen after the spike
1st tick subtracts 2s off m_timer (3s remains) but returns 5s - you advance weather internal timer by 5s
2nd world tick happens at normal rate, removing 2s off m_timer again (1s remains) and returns 3s - you advance weather internal timer by 3s

you ended up advancing internal weather timer by 8s instead

Pages (4): Previous 1 2 3 4 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)