채팅0

    점언 삭제하는법 이거 맞나요? 안됨니다

    조회수 449

    **WsUser.OnUserLoadedOnClient 에서


    이것들 삭제하면 게임 접속이 안됩니다 검은화면 로딩에서 멈춤**


    zz_y7.fly_dupe = function(mob)

    local hitByLeft = false

    local knockbackType = 1

    local kb = mob.MobKnockbackComponent

    local ai = mob.MobAIComponent

    local rb = mob.MobRigidbodyComponent

    local map = mob.CurrentMap
    local boundLt, boundRb = map.MapComponent:GetBound()
    local minX = boundLt.x + 0.1
    local maxX = boundRb.x - 0.1
    local mobPos = mob.TransformComponent.WorldPosition:ToVector2()
    local sqrt = math.sqrt
    
    local elapse = 0
    local knockbackMoveEnd
    local interruptedEnd
    if (knockbackType == 2) then 
    	knockbackMoveEnd = 0.5	
    	interruptedEnd = 0.7 
    else 
    	knockbackMoveEnd = 0.1
    	interruptedEnd = 0.5
    end
    
    local timelines = {}
    local timelineIndex = 0
    local currentX = mobPos.x
    local currentY = mobPos.y
    
    local function makeDistance(x1, y1, x2, y2)
    	return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))
    end
    
    kb:SetShoeAttr(knockbackType)
    local knockbackSpeed = rb.WalkSpeed * _Physics.FlySpeed / 1
    
    ---@param destX number
    ---@param destY number
    ---@param floating boolean
    ---@return number
    local function makeFlyCommand(cmd, destX, destY, floating)
    	local distance = makeDistance(currentX, currentY, destX, destY) 
    	currentX = destX
    	currentY = destY
    	local duration = distance / knockbackSpeed
    	timelines[timelineIndex + 1] = {cmd, {destX, destY, duration, floating}, 0}
    	timelineIndex += 1
    	return duration
    end
    local function makeCommand(cmd, value, nextTime)
    	timelines[timelineIndex + 1] = {cmd, value, nextTime}
    	timelineIndex += 1
    end
    
    local inputX = 1
    if (hitByLeft) then
    	inputX = -1
    end
    
    -- makeCommand(_MobActionPartType.HitMotion, 1, 0)
    
    local knockbackDestX = mobPos.x
    local delta = knockbackSpeed * knockbackMoveEnd
    if (inputX < 0) then
    	knockbackDestX = math.max(minX, mobPos.x - delta)
    else
    	knockbackDestX = math.min(maxX, _UserService.LocalPlayer.TransformComponent.WorldPosition.x + 0.8)
    end
    
    if (mobPos.x ~= knockbackDestX) then
    	mobPos.y += 0.02
    	-- makeCommand(_MobActionPartType.KnockbackPos, mobPos, 0)
    	makeFlyCommand(_MobActionPartType.KnockbackFly, knockbackDestX, _UserService.LocalPlayer.TransformComponent.WorldPosition.y , false)
    end
    
    -- makeCommand(_MobActionPartType.HitMotion, 0, interruptedEnd)
    
    if (timelineIndex > 0) then
    	map.LifeControllerComponent:RequestControl(mob, timelines, timelineIndex, true)
    end

    end

    zz_y7.jump_dupe = function(mob)

    local ai = mob.MobAIComponent

    local kb = mob.MobKnockbackComponent

    local rb = mob.MobRigidbodyComponent

    if (not isvalid(rb)) then

    if (isvalid(ai)) then

    -- ai:EnableNextControlTimer(0.1)

    end

    return

    end

    if (not mob.Visible) then

    -- ai:EnableNextControlTimer(0.1)

    return

    end

    local fh = rb.LastFoothold

    if (fh == 0) then

    --log("last foothold is 0")

    -- ai:EnableNextControlTimer(0.1)

    return

    end

    local now = _UtilLogic.ServerElapsedSeconds
    -- if (now < ai.NextActionTime) then
    -- 	-- ai:EnableNextControlTimer(math.max(ai.NextActionTime - now, 0) + 0.1)
    -- 	return
    -- end
    
    local target = _UserService.LocalPlayer
    local nextAction = 0
    local newInputX = nil
    local mobX = mob.TransformComponent.WorldPosition.x
    if (isvalid(target) and ai.LocalUnchaseTick < 7) then
    	if (ai.AttackWasLast) then
    		nextAction = _GlobalRand32:RandomIntegerRange(100, 110) / 1000
    		ai.AttackWasLast = false
    	else
    		nextAction = _GlobalRand32:RandomIntegerRange(100, 110) / 1000
    	end
    	local targetX = target.TransformComponent.WorldPosition.x
    	if math.abs(targetX - mobX) > 6 then
         if targetX > mobX then
            -- newInputX = 3
            newInputX = 3
         else
            -- newInputX = -3
            newInputX = -3
         end
      else
         newInputX = math.max(targetX - mobX + 1.2, -3)
      end

    else

    nextAction = (_GlobalRand32:RandomIntegerRange(200, 210) / 1000)

    newInputX = _UserService.LocalPlayer.TransformComponent.WorldPosition.x - mobX + 1.2

    end

    local platforms = mob.CurrentMap.PlatformInfoComponent
    local timelines = {}
    local timelineIndex = 0
    --log("platform left x (fh=%d)", platform.left.x, platform.left.foothold.Id)
    --log("platform right x (fh=%d)", platform.right.x, platform.right.foothold.Id)
    local lastTimeline = 0
    -- local playerFh = _UserService.LocalPlayer.WsUserController.LastFoothold
    -- if (playerFh == 0 or platforms.ZMass[playerFh] ~= ai.LocalStartChaseZMass) then
    -- 	ai.LocalUnchaseTick += 1
    -- 	ai:IncUnTick()
    -- end
    
    local function makeCommand(cmd, value, timeline, nextActionTime)
    	timelines[timelineIndex + 1] = {cmd, value, timeline - lastTimeline, nextActionTime}
    	timelineIndex += 1
    	lastTimeline = timeline
    end
    
    
    local targetX = _UserService.LocalPlayer.TransformComponent.WorldPosition.x
    local targetY = _UserService.LocalPlayer.TransformComponent.WorldPosition.y
    local mobY = mob.TransformComponent.WorldPosition.y
    local gapX = math.abs(mobX - targetX)
    local gapY = math.abs(mobY - targetY)
    if gapX > 3 then
    	makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
    	makeCommand(_MobActionPartType.Jump, 0, 0)
    elseif gapY > 1.5 then
    	makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
    	makeCommand(_MobActionPartType.Jump, -1, 0)
    elseif gapX < 0.3 and targetX < mobX then
    	makeCommand(_MobActionPartType.Move, 0, 0, nextAction)
    else
    	makeCommand(_MobActionPartType.Move, newInputX, 0, nextAction)
    end
    
    
    kb:SetShoeAttr(0)
    
    if (timelineIndex > 0) then
    	mob.CurrentMap.LifeControllerComponent:RequestControl(mob, timelines, timelineIndex, false)
    end

    end


    end

    댓글5

    회원프로필

    그걸 삭제하면 안되지.. 그냥 f2그냥 뽑는게 더 빠르다

    2024.02.26 22:42
    회원프로필

    f2 누르지도 않았는데 가끔 버그로 자동으로 점언 써져서 바로 정지먹는거땜에 그럼

    2024.02.26 22:43
    회원프로필

    왜 지움 잘만되는데

    2024.02.26 22:43
    회원프로필

    1:1주면 지워드림

    2024.02.26 22:49
    회원프로필

    저도이것땜에 사망한듯.. 1:1좀..도와주세요 ㅠㅠ

    2024.02.26 23:20

      게시글 리스트
      제목작성자작성일조회
      4452902-26139
      4452802-26109
      4452702-26136
      4452602-26399
      4452502-2691
      4452402-26114
      4452302-26133
      4452202-26927
      4452102-26269
      4452002-26418
      4451902-26101
      4451802-26119
      4451702-26450
      4451602-26219
      4451502-26174
      4451402-26395
      4451302-26246
      4451202-26128
      4451102-26274
      4451002-26193