change: ownership can now be be changed on objects
This commit is contained in:
@@ -32,6 +32,10 @@ namespace Reset.Units{
|
||||
}
|
||||
|
||||
public void TakeDamage(DamageSource source){
|
||||
if (UnitIsNetworked()) {
|
||||
TakeOwnershipRpc((source.source as GameObject).GetComponent<NetworkObject>().OwnerClientId);
|
||||
}
|
||||
|
||||
try {
|
||||
currentHealth -= source.damageDealt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user