Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
478 stars 77 forks source link

Fireanimation laggy #1173

Open Spikeone opened 4 years ago

Spikeone commented 4 years ago

Left: S2 Right: RttR The fire is somehow laggy

fire

Flamefire commented 4 years ago

Do you want to have a go on it? Shouldn't be to hard: Just change the frame times in noFire :) Maybe you can even find the original frame rate from your recordings

Flamefire commented 4 years ago

Ok might be more work, the fire is wrong: The animation frequency depends on the addon setting. So road to solving this: Make the switch to trash on https://github.com/Return-To-The-Roots/s25client/blob/5ed36fcc4969da72dec774a7461b414ca7ea0c30/libs/s25main/nodeObjs/noFire.cpp#L75 depend on the actual duration: https://github.com/Return-To-The-Roots/s25client/blob/5ed36fcc4969da72dec774a7461b414ca7ea0c30/libs/s25main/nodeObjs/noFire.cpp#L36

Then in the "burning" branch use https://github.com/Return-To-The-Roots/s25client/blob/25268a76e92ac9f8e2885f18337f3a7c03ac7966/libs/s25main/network/GameClient.cpp#L1479 to calculate the current frame. Something like GAMECLIENT.GetGlobalAnimation(8, 5, 3, gameObjId) or so (see other uses)

Spikeone commented 4 years ago

Well, will try, when I finally changed the desert texture, keyboard layout and my granite addon :) Thanks for the hints