Translations:Movement/15/zh: Difference between revisions

From DDraceNetwork
Darkh (talk | contribs)
Created page with "<code>src/game/gamecore.cpp</code> (在利用速度计算玩家下一个位置前有如下代码):<syntaxhighlight lang="c++"> if(length(m_Vel) > 6000) m_Vel = normalize(m_Vel) * 6000; </syntaxhighlight>其中内嵌了一个函数重新计算了速度带来的影响,是竖直速度的瓶颈。而水平方向上也有一个ramp曲线因子,导致玩家在速度过快时减速或者停下。在加速时很容易看见这些现象。"
 
Darkh (talk | contribs)
No edit summary
 
Line 2: Line 2:
if(length(m_Vel) > 6000)
if(length(m_Vel) > 6000)
     m_Vel = normalize(m_Vel) * 6000;
     m_Vel = normalize(m_Vel) * 6000;
</syntaxhighlight>其中内嵌了一个函数重新计算了速度带来的影响,是竖直速度的瓶颈。而水平方向上有一个ramp曲线因子,导致玩家在速度过快时减速或者停下。在加速时很容易看见这些现象。
</syntaxhighlight>其中内嵌了一个归一化函数重新计算了速度带来的影响,是竖直速度的瓶颈由来。而水平方向上有一个ramp曲线因子,导致玩家在速度过快时减速或者停下。在加速时很容易看见这些现象。

Latest revision as of 03:50, 28 July 2023

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Movement)
<code>src/game/gamecore.cpp</code> (before calculating new position from velocity):<syntaxhighlight lang="c++">
if(length(m_Vel) > 6000)
   m_Vel = normalize(m_Vel) * 6000;
</syntaxhighlight>This is the bottleneck in vertical movement. In horizontal movement a “ramp”-Value is multiplied to the horizontal speed. Causing the tee to slow down and stop when getting too fast. This is most commonly observed in speed ups.

src/game/gamecore.cpp (在利用速度计算玩家下一个位置前有如下代码):

if(length(m_Vel) > 6000)
    m_Vel = normalize(m_Vel) * 6000;

其中内嵌了一个归一化函数重新计算了速度带来的影响,是竖直速度的瓶颈由来。而水平方向上则有一个ramp曲线因子,导致玩家在速度过快时减速或者停下。在加速时很容易看见这些现象。