Fix typos with codespell

Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit eb78f80f03)
This commit is contained in:
Rémi Verschelde
2021-05-20 12:47:34 +02:00
parent 066ceefcaf
commit 337ef03958
28 changed files with 33 additions and 33 deletions

View File

@@ -137,7 +137,7 @@
</argument>
<description>
Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds.
The [code]timeout_limit[/code] is a factor that, multiplied by a value based on the avarage round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [code]timeout_min[/code]. The [code]timeout_max[/code] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
The [code]timeout_limit[/code] is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [code]timeout_min[/code]. The [code]timeout_max[/code] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.
</description>
</method>
</methods>

View File

@@ -959,7 +959,7 @@ void FBXMeshData::triangulate_polygon(Ref<SurfaceTool> st, Vector<int> p_polygon
for (List<TriangulatorPoly>::Element *I = out_poly.front(); I; I = I->next()) {
TriangulatorPoly &tp = I->get();
ERR_FAIL_COND_MSG(tp.GetNumPoints() != 3, "The triangulator retuned more points, how this is possible?");
ERR_FAIL_COND_MSG(tp.GetNumPoints() != 3, "The triangulator returned more points, how this is possible?");
// Find Index
for (int i = 2; i >= 0; i -= 1) {
const Vector2 vertex = tp.GetPoint(i);

View File

@@ -138,7 +138,7 @@ private:
/// [0, 2, 1, 3, 4]
/// The negative values are computed using this formula: `(-value) - 1`
///
/// Returns the vertex index from the poligon vertex.
/// Returns the vertex index from the polygon vertex.
/// Returns -1 if `p_index` is invalid.
int get_vertex_from_polygon_vertex(const std::vector<int> &p_face_indices, int p_index) const;

View File

@@ -1076,7 +1076,7 @@ Spatial *EditorSceneImporterFBX::_generate_scene(
//print_verbose("[doc] node animation path: " + node_path);
}
} else {
// note: this could actually be unsafe this means we should be careful about continuing here, if we see bizzare effects later we should disable this.
// note: this could actually be unsafe this means we should be careful about continuing here, if we see bizarre effects later we should disable this.
// I am not sure if this is unsafe or not, testing will tell us this.
print_error("[doc] invalid fbx target detected for this track");
continue;

View File

@@ -565,7 +565,7 @@ const std::vector<const AnimationStack *> &Document::AnimationStacks() const {
const AnimationStack *stack = lazy->Get<AnimationStack>();
ERR_CONTINUE_MSG(!stack, "invalid ptr to AnimationStack - conversion failure");
// We push back the weak reference :) to keep things simple, as ownership is on the parser side so it wont be cleaned up.
// We push back the weak reference :) to keep things simple, as ownership is on the parser side so it won't be cleaned up.
animationStacksResolved.push_back(stack);
}

View File

@@ -733,7 +733,7 @@ private:
typedef std::vector<int64_t> KeyTimeList;
typedef std::vector<float> KeyValueList;
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefor) */
/** Represents a FBX animation curve (i.e. a 1-dimensional set of keyframes and values therefore) */
class AnimationCurve : public Object {
public:
AnimationCurve(uint64_t id, const ElementPtr element, const std::string &name, const Document &doc);

View File

@@ -125,7 +125,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
ScopePtr sc = element->Compound();
ERR_FAIL_COND_MSG(sc == nullptr, "failed to read geometry, prevented crash");
ERR_FAIL_COND_MSG(!HasElement(sc, "Vertices"), "Detected mesh with no vertexes, didn't populate the mesh");
ERR_FAIL_COND_MSG(!HasElement(sc, "Vertices"), "Detected mesh with no vertices, didn't populate the mesh");
// must have Mesh elements:
const ElementPtr Vertices = GetRequiredElement(sc, "Vertices", element);
@@ -140,7 +140,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
ParseVectorDataArray(m_vertices, Vertices);
ParseVectorDataArray(m_face_indices, PolygonVertexIndex);
ERR_FAIL_COND_MSG(m_vertices.empty(), "mesh with no vertexes in FBX file, did you mean to delete it?");
ERR_FAIL_COND_MSG(m_vertices.empty(), "mesh with no vertices in FBX file, did you mean to delete it?");
ERR_FAIL_COND_MSG(m_face_indices.empty(), "mesh has no faces, was this intended?");
// Retrieve layer elements, for all of the mesh
@@ -278,7 +278,7 @@ MeshGeometry::MeshGeometry(uint64_t id, const ElementPtr element, const std::str
}
}
// As the algorithm above, this check is useless. Because the first
// ever vertex is always considered the begining of a polygon.
// ever vertex is always considered the beginning of a polygon.
ERR_FAIL_COND_MSG(found_it == false, "Was not possible to find the first vertex of this polygon. FBX file is corrupted.");
} else {
@@ -419,7 +419,7 @@ MeshGeometry::MappingData<T> MeshGeometry::resolve_vertex_data_array(
// parse data into array
ParseVectorDataArray(tempData.data, GetRequiredElement(source, dataElementName));
// index array wont always exist
// index array won't always exist
const ElementPtr element = GetOptionalElement(source, indexDataElementName);
if (element) {
ParseVectorDataArray(tempData.index, element);

View File

@@ -122,7 +122,7 @@ typedef std::vector<int> MatIndexArray;
/// ## Map Type:
/// * None The mapping is undetermined.
/// * ByVertex There will be one mapping coordinate for each surface control point/vertex (ControlPoint is a vertex).
/// * If you have direct reference type verticies[x]
/// * If you have direct reference type vertices[x]
/// * If you have IndexToDirect reference type the UV
/// * ByPolygonVertex There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part. (Sorted by polygon, referencing vertex)
/// * ByPolygon There can be only one mapping coordinate for the whole polygon.
@@ -186,7 +186,7 @@ public:
/// Returns -1 if the vertices doesn't form an edge. Vertex order, doesn't
// matter.
static int get_edge_id(const std::vector<Edge> &p_map, int p_vertex_a, int p_vertex_b);
// Retuns the edge point bu that ID, or the edge with -1 vertices if the
// Returns the edge point bu that ID, or the edge with -1 vertices if the
// id is not valid.
static Edge get_edge(const std::vector<Edge> &p_map, int p_id);

View File

@@ -129,7 +129,7 @@ Transform get_unscaled_transform(const Transform &p_initial, real_t p_scale) {
}
Vector3 get_poly_normal(const std::vector<Vector3> &p_vertices) {
ERR_FAIL_COND_V_MSG(p_vertices.size() < 3, Vector3(0, 0, 0), "At least 3 vertices are necesary");
ERR_FAIL_COND_V_MSG(p_vertices.size() < 3, Vector3(0, 0, 0), "At least 3 vertices are necessary");
// Using long double to make sure that normal is computed for even really tiny objects.
typedef long double ldouble;
ldouble x = 0.0;

View File

@@ -1206,7 +1206,7 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
codegen.opcodes.push_back(dst_address_a); // argument 1
codegen.opcodes.push_back(src_address_b); // argument 2 (unary only takes one parameter)
}
return dst_address_a; //if anything, returns wathever was assigned or correct stack position
return dst_address_a; //if anything, returns whatever was assigned or correct stack position
}
} break;
case GDScriptParser::OperatorNode::OP_IS: {

View File

@@ -989,7 +989,7 @@ void LightmapperCPU::_post_process(uint32_t p_idx, void *r_output) {
void LightmapperCPU::_compute_seams(const MeshInstance &p_mesh, LocalVector<UVSeam> &r_seams) {
float max_uv_distance = 1.0f / MAX(p_mesh.size.x, p_mesh.size.y);
max_uv_distance *= max_uv_distance; // We use distance_to_squared(), so wee need to square the max distance as well
max_uv_distance *= max_uv_distance; // We use distance_to_squared(), so we need to square the max distance as well
float max_pos_distance = 0.00025f;
float max_normal_distance = 0.05f;

View File

@@ -345,7 +345,7 @@ Ref<Script> CSharpLanguage::get_template(const String &p_class_name, const Strin
"}\n";
// Replaces all spaces in p_class_name with underscores to prevent
// erronous C# Script templates from being generated when the object name
// invalid C# Script templates from being generated when the object name
// has spaces in it.
String class_name_no_spaces = p_class_name.replace(" ", "_");
String base_class_name = get_base_class_name(p_base_class_name, class_name_no_spaces);

View File

@@ -48,7 +48,7 @@
Valid [code]options[/code] are:
[codeblock]
{
"negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. data_channel_received will not be called.
"negotiated": true, # When set to true (default off), means the channel is negotiated out of band. "id" must be set too. "data_channel_received" will not be called.
"id": 1, # When "negotiated" is true this value must also be set to the same value on both peer.
# Only one of maxRetransmits and maxPacketLifeTime can be specified, not both. They make the channel unreliable (but also better at real time).

View File

@@ -7,7 +7,7 @@
WebXR is an open standard that allows creating VR and AR applications that run in the web browser.
As such, this interface is only available when running in an HTML5 export.
WebXR supports a wide range of devices, from the very capable (like Valve Index, HTC Vive, Oculus Rift and Quest) down to the much less capable (like Google Cardboard, Oculus Go, GearVR, or plain smartphones).
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to intialize than other AR/VR interfaces.
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to initialize than other AR/VR interfaces.
Here's the minimum code required to start an immersive VR session:
[codeblock]
extends Spatial