Originally posted by Blade[UG]
View Post
Announcement
Collapse
No announcement yet.
Curius thing.
Collapse
X
-
Blade[UG] repliedi don't know, that doesn't seem like it should be an error - what if i want to override that function in a later class, and not do anything with the function at all, or not do anything with the parameter?
If it threw a warning or error for every function I've ever stubbed out, i'd be really annoyed.
Leave a comment:
-
lilezek repliedAnother at 922 from UTGame.uc. The better of this is that compiler should give some warning about botToRemove parameter unreferenced, shouldn't it?
Code:/** * Look at the current game rules and determine if there are too many bots. In a single player * game, this function will always return false since the teams are preset and changes are not allowed. * * @Param BotToRemove The Bot to remove */ function bool TooManyBots(Controller botToRemove) { // We only auto-manage bots if we are not in single player mode. if ( SinglePlayerMissionID == INDEX_NONE ) { if ( (WorldInfo.NetMode != NM_Standalone) && bPlayersVsBots ) return ( NumBots > Min(16,BotRatio*NumPlayers) ); if ( bPlayerBecameActive ) { bPlayerBecameActive = false; return true; } return ( NumBots + NumPlayers > DesiredPlayerCount ); } return false; }
Leave a comment:
-
lilezek repliedPeople should be dangerus with the copy paste haha. Well, just was my curiosity. Thank you for reply.
Leave a comment:
-
Mr Evil repliedThe answer is in the original UT3 source code:
Code:if ( bEnemyKill ) { V = UTVehicle(KilledPawn); if ( KilledPRI.IsHero() ) { KillerPRI.IncrementHeroMeter(6.0, UTDamageType); } if ( (V != None) && (V.HeroBonus > 0) ) { KillerPRI.IncrementHeroMeter(V.HeroBonus, UTDamageType); } if ( !bFirstBlood ) { bFirstBlood = True; KillerPRI.IncrementHeroMeter(1.0, UTDamageType); BroadcastLocalizedMessage( class'UTFirstBloodMessage', 0, KillerPRI ); KillerPRI.IncrementEventStat('EVENT_FIRSTBLOOD'); } }
Leave a comment:
-
lilezek started a topic Curius thing.Curius thing.
Because I could not continue with successfully any tutorial, I stated investigating UT scripts. When I reached function Killed, I saw this:
Code:if ( bEnemyKill ) { V = UTVehicle(KilledPawn); // <--- redundant line??? if ( !bFirstBlood ) { bFirstBlood = True; BroadcastLocalizedMessage( class'UTFirstBloodMessage', 0, KillerPRI ); KillerPRI.IncrementEventStat('EVENT_FIRSTBLOOD'); } }
Shouldn't it be removed in next release?
You can find that line at 641 at UTGame.uc.Tags: None
Leave a comment: