The unrealscript 'stack' is an allocated object that points to the owner, node, compiled script and locals.
UObject::ProcessInternal processes the script opcodes until a EX_Return opcode is found, no overflow check is done, EX_Return ALWAYS has to end a function.
C++ compilers automatically do what you do with the code when there's multiple returns with the same value, in that case, the compiled code will automatically contain various jumps to the same return directive (as many jumps as returns you add).
As Torvalds not-so-kindly told one of the Linux devs, don't do compiler masturbation (unless there's no choice).
EDIT:
Regarding bot replication, have you see anything weird with bots or monsters running being badly updated on clients? Someone running a linux server told me he literally saw monsters and bots 'sliding' and 'teleporting' but it may have been a case of bad networking, i've not been able to reproduce this.
Also, I'm considering reducing the amount of forced position updates the server does on the player owner, as everyone knows, increasing server tickrate increases the amount of 'PlayerAdjustPosition' (i think that was the name) calls the server sends to the player, and that can increase per-player bandwidth by 2 kb/s if tickrate goes from 30 to 65 for example.
Forcing it to a solid 30 (even if TR goes to 100) is a good thing imo.
And since the amount of calls is in the PlayerPawn class, it's nothing ReplaceFunction cannot handle

========
Gonna try this formula (finally found a use for InvSqrt native)
Then, the error will get an additional amount if:
- Player is likely to imagedropping (standing on an edge) = Force update
- Player has non-static colliding actor nearby: +0.1
-- Actor blocks players: +0.1
-- Actor is PHYS_Walking/PHYS_Swimming/SimulatedProxy: +0.1
--- Said actor is 10 units away from touching player: +0.8
An error of 3 forces the position correction from the server to the client (positional error between client and server), this way the server will smartly send data if the simulation is likely to be altered by a pawn and will do so at saner intervals.
It's completely likely to see much lower bandwidths in solo-player conditions (coop, MH, 1v1)
Code: Select all
//LanSpeed 80000 = Check 28 times a second
//NetSpeed 20000 = Check 20 times a second
//NetSpeed 5000 = Check 7 times a second
if ( Level.TimeSeconds-LastUpdateTime > 10*InvSqrt(Player.CurrentNetSpeed) )
{
LocDiff = Location - ClientLoc;
ClientErr = (LocDiff Dot LocDiff) + AddedPosError();
}