UT Source copyright

While my game is mainly based on the ShooterGame example and Survival tutorial series, i have also been looking at the UnrealTournament source code to get some ideas and see the differences.

But is re-using small parts of the UT source code for your own game violation of copyright?
At this point its mainly the Character::TakeDamage i’m interested in from the UT source code cause it’s more advanced.