void URealmCharacterMovementComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) { Super::TickComponent(DeltaTime, TickType, ThisTickFunction); if (bCharacterDashing) { if ((GetCharacterOwner()->GetActorLocation() - targetDashLocation).IsNearlyZero(15.f)) EndDash(); else GetCharacterOwner()->SetActorLocation(FMath::VInterpConstantTo(GetCharacterOwner()->GetActorLocation(), targetDashLocation, DeltaTime, 7100.f*flySpeedScale)); } }
void URealmCharacterMovementComponent::ClearMovementIgnorance() { //clear any timers that have been set for clearing this (i.e. if someone gets rid of a stun before its duration is up) GetCharacterOwner()->GetWorldTimerManager().ClearTimer(ignoreMovementTimer); SetMovementMode(MOVE_Walking); }
void URealmCharacterMovementComponent::DashLaunch(FVector const& endLocation, float spdScale) { bCharacterWantsDash = true; PendingLaunchVelocity = endLocation; targetDashLocation = endLocation; targetDashLocation.Z = GetCharacterOwner()->GetActorLocation().Z; flySpeedScale = spdScale; }
void Equipment::reduce_hp_from_hit() { if ( hp_ >= 1 && Clib::random_int( 99 ) == 0 ) { set_dirty(); --hp_; increv(); if ( isa( CLASS_ARMOR ) ) { Mobile::Character* chr = GetCharacterOwner(); if ( chr != NULL ) chr->refresh_ar(); } send_object_cache_to_inrange( this ); } }
void URealmCharacterMovementComponent::IgnoreMovementForDuration(float duration) { GetCharacterOwner()->GetWorldTimerManager().SetTimer(ignoreMovementTimer, this, &URealmCharacterMovementComponent::ClearMovementIgnorance, duration); IgnoreMovement(); }