Skip to content

Commit 8cd3dc1

Browse files
committed
保底一点的高亮位置
1 parent e635013 commit 8cd3dc1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎addons/sourcemod/scripting/l4d_tankfight.sp‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ public Action SelectSurvivorSpawnPosition(Handle timer){
608608
}
609609
TFData.fSurvivorPercentReal += 0.02;
610610
if (TFData.fSurvivorPercentReal > TFData.fSurvivorPercentTarget){
611+
// 传送至生还者高亮模型的位置
612+
TeleportAllSurvivorToModelPosition();
611613
return Plugin_Stop;
612614
}
613615
CreateTimer(0.3, SelectSurvivorSpawnPosition);
@@ -1212,6 +1214,22 @@ void TeleportAllSurvivorToPercentFlow(float TargetPercent)
12121214
}
12131215
}
12141216

1217+
/**
1218+
* 传送所有生还者到生还者高亮模型的位置
1219+
*/
1220+
void TeleportAllSurvivorToModelPosition()
1221+
{
1222+
// 检查生还者模型位置是否有效
1223+
if (GetVectorLength(g_vSurvivorModelPos) > 0.0)
1224+
{
1225+
for (int i = 1; i <= MaxClients; i++){
1226+
if (IsClientInGame(i) && IsSurvivor(i)){
1227+
TeleportEntity(i, g_vSurvivorModelPos, g_vSurvivorModelAng, NULL_VECTOR);
1228+
}
1229+
}
1230+
}
1231+
}
1232+
12151233
/**
12161234
* 显示当前每只tank刷出的奖励分的指令处理函数
12171235
* 支持 sm_cur 指令

0 commit comments

Comments
 (0)