Browse Source

Added comment that delay will always be set

Lemongrass3110 1 month ago
parent
commit
f0cc08570c
1 changed files with 12 additions and 14 deletions
  1. 12 14
      src/map/mob.cpp

+ 12 - 14
src/map/mob.cpp

@@ -4105,22 +4105,20 @@ void mobskill_delay(mob_data& md, t_tick tick)
 			}
 			}
 		}
 		}
 
 
-		// Only calculate the delay, if there is any
-		if (delay > 0) {
-			// Calculate the delay once
-			delay = tick + delay;
-
-			// Apply delay found to all entries of the skill
-			for (size_t i = 0; i < ms.size(); i++) {
-				// Check if the skill id matches
-				if (ms[i]->skill_id != ms[md.skill_idx]->skill_id) {
-					// Skip other skills
-					continue;
-				}
+		// Calculate the delay once
+		// Note: Officially the delay gets set, even if it is 0.
+		delay = tick + delay;
 
 
-				// Apply the delay
-				md.skilldelay[i] = delay;
+		// Apply delay found to all entries of the skill
+		for (size_t i = 0; i < ms.size(); i++) {
+			// Check if the skill id matches
+			if (ms[i]->skill_id != ms[md.skill_idx]->skill_id) {
+				// Skip other skills
+				continue;
 			}
 			}
+
+			// Apply the delay
+			md.skilldelay[i] = delay;
 		}
 		}
 	}
 	}
 	else
 	else